Changeset 4664
- Timestamp:
- 08/05/06 01:56:58 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/base.rb (modified) (1 diff)
- trunk/actionpack/test/controller/base_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4660 r4664 1 1 *SVN* 2 3 * Make controller_path available as an instance method. #5724 [jmckible@gmail.com] 2 4 3 5 * Update query parser to support adjacent hashes. [Nicholas Seckar] trunk/actionpack/lib/action_controller/base.rb
r4637 r4664 499 499 self.class.controller_name 500 500 end 501 502 # Converts the class name from something like "OneModule::TwoModule::NeatController" to "one_module/two_module/neat". 503 def controller_path 504 self.class.controller_path 505 end 501 506 502 507 def session_enabled? trunk/actionpack/test/controller/base_test.rb
r4656 r4664 37 37 def test_controller_path 38 38 assert_equal 'empty', EmptyController.controller_path 39 assert_equal EmptyController.controller_path, EmptyController.new.controller_path 39 40 assert_equal 'submodule/contained_empty', Submodule::ContainedEmptyController.controller_path 41 assert_equal Submodule::ContainedEmptyController.controller_path, Submodule::ContainedEmptyController.new.controller_path 40 42 end 41 43 def test_controller_name … … 57 59 def test_action_methods 58 60 @empty_controllers.each do |c| 59 assert_equal Set.new, c.send(:action_methods), "#{c.c lass.controller_path} should be empty!"61 assert_equal Set.new, c.send(:action_methods), "#{c.controller_path} should be empty!" 60 62 end 61 63 @non_empty_controllers.each do |c| 62 assert_equal Set.new('public_action'), c.send(:action_methods), "#{c.c lass.controller_path} should not be empty!"64 assert_equal Set.new('public_action'), c.send(:action_methods), "#{c.controller_path} should not be empty!" 63 65 end 64 66 end