Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ambigitous behaviour of using link_to helper

#4173

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.

Reported by Ravinder Rana · March 14th, 2010 @ 11:32 AM

State: resolved
Milestone: 3.0.2
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: Low

Activity

  1. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • 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.

    March 27th, 2010 @ 09:04 AM

  2. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM