This project is archived and is in readonly mode.
app.my_path_url is protected
-
Yehuda Katz (wycats)
- Milestone cleared.
- State changed from new to open
-
Rohit Arondekar
I'm getting undefined method for Rails master on 1.9.2-head
NoMethodError: undefined methodescalation_definitions_path' for #<ActionDispatch::Integration::Session:0x000000033caa98><br/>from /home/rohit/remote-repos/rails_patches/working4/actionpack/lib/action_dispatch/testing/assertions/routing.rb:175:in `method_missing'Similarly for _url
-
Michael Koziarski
- Milestone cleared.
-
Rohit Arondekar
Confirmed on Rails master.
Steps to reproduce:
1] Create a rails app
2] Generate a resource, rails g resource post
3] Open rails console, rails c
4] app.posts_path, will throw a protected method called error.What I found was in route_set.rb in /actionpack/lib/action_dispatch/routing/ the define_url_helper() method has a protected in front of :#{selector} Line nos 179. If I remove the protected, the above issue is resolved, the method is no longer protected.
However a test fails.
1) Failure:
test_url_helpers_does_not_become_actions(UrlOptionsTest) [test/controller/base_test.rb:230]:
Failed assertion, no message given.The following assert fails,
assert !@controller.class.action_methods.include?("account_overview_path")I don't know if the test needs fixing or the code.
-
Repository
- State changed from open to resolved
(from [eebac026060ef9a5e69e69b01df61acee7c6c07f]) Make named helpers unprotected without becoming actions [#4696 app.my_path_url is protected state:resolved] http://github.com/rails/rails/commit/eebac026060ef9a5e69e69b01df61a...
-
Neeraj Singh
15 minutes ago it was not fixed. And now that I am ready to attach a patch it is fixed. Anyway attaching my patch :-)
