Displaying 20 results from an estimated 1047 matches for "link_tos".
Did you mean:
link_to
2013 Mar 15
5
link_to should have its body and url arguments reversed
I think the link_to helper method is quite confusing with its arguments
order:
link_to body, url
link_to "Click me", @person
Why is it thay way round? I want to make a "link to [the] person", so I
would expect the order to be:
link_to @person, "Click me"
It reads much more natural. You don''t "link to [the] body", you "link to
2006 Jun 09
5
Using link_to with an image tag & link text
Hi ,
I was trying to use link_to along with image_tag
to setup a link that would open in an external window.
But I was unable to make a link using both text & an image
So my current workaround looks like this inside a partial
where link is http://foo.com & text would be descriptive
<img src="images/arrow.gif" border="0"/> <%= link_to(text, link,
:popup
2007 Jun 28
23
DRYing link_to with a symbol
Hi, I just put in a patch that allows you to DRY up this:
<%= link_to @company.name, @company %>
to this:
<%= link_to :name, @company %>
The symbol indicates the method to be called on the object passed in
the link_to options.
http://dev.rubyonrails.org/ticket/8789
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2006 Aug 18
3
equivalent of "puts" in rhtml
Hi everyone,
This seems so basic, and yet I can''t quite figure it out.
Say I have some code in an .rhtml document:
<%=
if @session[:user_id]
link_to somethingA
else
link_to somethingB
link_to somethingC
end
-%>
Only the link to somethingC will show in the second case. I understand
that the last thing returned from that else block is that last line. In
php i could just add
2006 Jul 27
4
problem with elsif
hi!
i have a little problem, im working with permissions, so if u are a
normal user, u can only view something and admins can view,edit, delete
i pick up the level, and then i check up, if the level is right, and
then i put the options. but i dont know why, the admin can only view and
delete, i mean my code only take the last link_to
here is the code:
<%= link_to "read",
2007 Nov 14
3
absolute urls in url_for vs. link_to
In both url_for and link_to, the :only_path param can be used to
determine whether the link url used is complete with hostname and path,
or just has the path (a kind of relative url).
However, in url_for it defaults to false (urls with hostnames), and in
link_to it defaults to true ( urls without hostnames, just paths).
Is there any reason for this discrepency? To me, it violates the
principle
2006 Jun 07
2
Hash flattening on paginator link_to
Hey
I need some help with pagination and the link_to in the view.
I''m trying to include a hash in the pagination link_to params and it
keeps flattening out my hash.
Example:
Here''s my hash called @answer:
"answer"=>{"6"=>"9bf31c7ff062936a96d3c8bd1f8f2ff3",
"7"=>"6f4922f45568161a8cdf4ad2299f6d23"}
2008 Jan 03
3
how to use "link_to" to deliver a parameter?
Hello, there:
I wish A link to invoke such a action together with the parameter
"zh_CN" "cookies/switch_language/zh_CH" to switch language
sellection, and I use the following code:
<%= link_to ''Chinese'', :controller => ''cookies'', :action =>
''switch_lang'' %>
But, how is "link_to" able to convey
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
Hello-
I would like to know what the suggested practice is for having multiple
submit buttons on a relatively complicated input page.
Let''s use the example of a Contact. There is lots of info there,
including name, address, phone number. There is also a list of "contact
associations" which can be modified on the same page.
Ideally, the user could have one
2008 Oct 17
1
link_to + image_tag
i want to integrated link_to with image_tag
before i did link_to with image_tag like this
<%=link_to image_tag(image.filename
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if
the user has no access right)
this is my code, it work the first time I run the application, the second
time I refresh the page I always get "stack level too deep error"
module UsersHelper
include ActionView::Helpers::UrlHelper
alias_method :link_to_original, :link_to
def permission?
true
2007 Dec 06
2
passing parameters through link_to
Is it possible to pass parameters through link_to that will be used by
the controller that link_to directs to? Specifically I have this
code:
<% for user in @users -%>
<%= link_to user.screen_name, {:action => "index", :controller =>
"users", :user_id => user.id } %>
<% end %>
Is it possible to use the parameter at the end of link_to(:user_id
2006 Jun 04
3
link_to tool tips
I think they are called tool tips...
I have view code that looks like this...
<%= link_to ''I'', :action => ''edit_innoculations'', :id => personnel %>
Is there an option (I don''t see it in api) to have tool tips for a
link_to ?
Craig
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id''
I have a Model class like the following:
class Article < ActiveRecord::Base
set_primary_key "ARTICLE_ID"
end
however, using a link_to like the following (modified scaffolding),
the link has no id value:
<% for article in @articles %>
<tr>
<% for column in
2005 Dec 15
6
passing parameters to link_to OR better way to do this?
Hi All:
I''m writing my 1st Rails app and I can''t seem to find the answer on
the web or in the book.
I''m making a table, and I want to be able to expand a filename. The
code is basically as as follows below. In the last <td> entry, I want
to call an action and pass in the test_results_path, which I will go
and read a file and munge the data for a separate
2006 Jan 20
4
[newbie]how to use link_to to link to another controller?
I am just diving into Rails and I am a bit puzzled by the link_to function.
am writing an app to display my photographs in categories. My application layout
has a sidebar to show a menu with categories from the categories table in the
database (like in taken from the tutorials), to be shown on every page.
I managed to get a global @menu_categories object that keeps track of all the
categories
2011 Feb 20
6
Link_to frustration...help?
I have a resource ''users''. the index page has a ''link_to'' tag I
created on the line item level for a specific view. The link_to that
is frustrating me in particular says: <%= link_to ''View'', :controller
=> ''users'', :action => ''view'' %>
What''s happening is that it''s going to
2006 May 24
1
link_to CSS problem
Hi all,
I''m a Ruby/Rails/web development newbie, so this may be a stupid
question. I''m putting some links using link_to into my rhtml page,
creating the layout using the DIV tag:
<div id="description">
<%= link_to h (item.description), :action => ''show'', :id => item.id
%>
</div>
...
div#description {
float: left;
2008 Jan 21
7
undefined method error
Hello everyone,
I am following the Practical Rails: Social Networking
sites book. In chapter 7 photo gallery I am getting a
NoMethodError in Pages#show
Showing layouts/_menu.rhtml where line #12 raised:
undefined method `new_entry_path'' for #<ActionView::Base:0x52fa56c>
Extracted source (around line #12):
9: <% if is_logged_in? %>
10:
2006 Jun 20
4
Invoking MouseOver using link_to tag ?
Hi,
How can we trigger a JavaScript built in function from a <%= link_to %>
ie. i have the below statement in my view. I want to invoke a JavaScript
function on "MouseOver" of this below text (''TestingMouseOverEvents'').
<%= link_to "TestingMouseOverEvents" , :controller => "login", :action
=> "logout"%>
Note: The