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.

Some url helpers are broken

#4718

If :to option is a proc then *_path helpers will append controller and action options. Assuming the following routes are defined:

get "/foo", :to => proc { |env| [200, {"Content-Type" => "text/plain"}, ["Hello world"]] }, :as => :foo
get "/bar", :to => redirect("/"), :as => :bar

The output of (foo|bar)_path helpers:

/foo?action=edit&controller=home
/bar?action=edit&controller=home

The test in routing_test.rb is available:

Line 33: match 'account/logout' => redirect("/logout"), :as => :logout_redirect
...
Line 310: assert_equal '/account/logout', logout_redirect_path

Pretty confused.

Reported by wildchild · May 28th, 2010 @ 03:58 PM

State: duplicate
Milestone: none
Assigned to: Andrew White Andrew White
Importance: Low

Activity

  1. Neeraj Singh
    Neeraj Singh
    • Assigned user set to Andrew White
    • Importance changed from to Low

    June 27th, 2010 @ 04:55 AM

  2. Andrew White
    Andrew White
    • State changed from new to duplicate

    Duplicate of #4326

    June 27th, 2010 @ 05:52 AM