This project is archived and is in readonly mode.
ambigitous behaviour of using link_to helper
Reported by Ravinder Rana | March 14th, 2010 @ 11:32 AM | in 3.0.2
According to the documentation of link_to helper there are two ways of calling it:
1. link_to(name, options = {}, html_options = nil)
2. link_to(options = {}, html_options = nil) do
# name
end
The difference in the two being the ability of not passing name "if the link target is hard to fit into the name parameter."
But the difference doesn't ends there. They need to be called using two different ways. :(
The first one should be called using <%= %> and the second one using <% %>. This seems somewhat awkward. Is there any specific reason for this behaviour? As a user this seems very confusing.
Comments and changes to this ticket
-
Yehuda Katz (wycats) March 27th, 2010 @ 09:04 AM
- State changed from new to resolved
- Assigned user set to Yehuda Katz (wycats)
- Milestone cleared.
This is fixed on master. On master, you should always use <%= %> to put things onto the page, including block helpers.
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to Low
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>