This project is archived and is in readonly mode.
controller_name is invalid when controller_path changes
-
deviated
Valid
-tried this on irb 0.9.5 and it prints this outirb(main):014:0> Hello.say
NoMethodError: undefined methodsay' for Hi:Class<br/>from (irb):11:in `say' from (irb):14 from /usr/local/bin/irb:12:in `<main>'*replaced 'controller_path' with say (doesn't matter what say does) basically did the same thing like he did, and it fails where his
succeeds. -
José Valim
- Milestone cleared.
- Assigned user set to José Valim
Could you please provide a patch with tests?
-
knapo
Will do tomorrow.
-
knapo
There you go!
I guess that new tests related to this stuff should be included into test/controller/new_base/base_test.rb not in test/controller/base_test.rb or both?
-
José Valim
You can add tests to any. The general idea is, new_base holds tests for stuff added specifically on Rails 3. base_test is since Rails early days. If you want me to pick one, I would say: go test/controller/base_test.rb :)
-
knapo
The reason I chose test/controller/new_base/base_test.rb is that I noticed that many tests (inc. controller_path, and controller_name related) in this file are duplicated between both test files (rewritten to new TestUnit syntax) with ones from test/controller/base_test.rb. So I thought that test/controller/base_test.rb is gonna to be replaced with new_base/base_test.rb :)
-
Repository
- State changed from new to resolved
(from [995b1a243cf8450b976eb40613f5cb703a22159a]) Fix controller_name for non default controller paths [#4901 controller_name is invalid when controller_path changes state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/995b1a243cf8450b976eb40613f5cb...
