Changeset 7776
- Timestamp:
- 10/07/07 19:12:02 (1 year ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/assertions/response_assertions.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/routing.rb (modified) (1 diff)
- trunk/actionpack/test/controller/action_pack_assertions_test.rb (modified) (2 diffs)
- trunk/actionpack/test/controller/url_rewriter_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r7756 r7776 1 1 *SVN* 2 3 * Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. #8562, #9525 [Justin Lynn, Tarmo TÀnav, shoe] 2 4 3 5 * Use #require_library_or_gem to load the memcache library for the MemCache session and fragment cache stores. Closes #8662. [Rick] trunk/actionpack/lib/action_controller/assertions/response_assertions.rb
r7580 r7776 70 70 71 71 if value.respond_to?(:[]) && value['controller'] 72 value['controller'] = value['controller'].to_s 72 73 if key == :actual && value['controller'].first != '/' && !value['controller'].include?('/') 73 74 new_controller_path = ActionController::Routing.controller_relative_to(value['controller'], @controller.class.controller_path) trunk/actionpack/lib/action_controller/routing.rb
r7724 r7776 1326 1326 expire_on = build_expiry(options, recall) 1327 1327 1328 if options[:controller] 1329 options[:controller] = options[:controller].to_s 1330 end 1328 1331 # if the controller has changed, make sure it changes relative to the 1329 1332 # current controller module, if any. In other words, if we're currently trunk/actionpack/test/controller/action_pack_assertions_test.rb
r7403 r7776 19 19 20 20 def redirect_to_controller() redirect_to :controller => "elsewhere", :action => "flash_me"; end 21 22 def redirect_to_controller_with_symbol() redirect_to :controller => :elsewhere, :action => :flash_me; end 21 23 22 24 def redirect_to_path() redirect_to '/some/path' end … … 430 432 end 431 433 434 def test_assert_redirection_with_symbol 435 process :redirect_to_controller_with_symbol 436 assert_nothing_raised { 437 assert_redirected_to :controller => "elsewhere", :action => "flash_me" 438 } 439 process :redirect_to_controller_with_symbol 440 assert_nothing_raised { 441 assert_redirected_to :controller => :elsewhere, :action => :flash_me 442 } 443 end 444 432 445 def test_redirected_to_with_nested_controller 433 446 @controller = Admin::InnerModuleController.new trunk/actionpack/test/controller/url_rewriter_test.rb
r7501 r7776 235 235 end 236 236 237 def test_path_generation_for_symbol_parameter_keys 238 assert_generates("/image", :controller=> :image) 239 end 240 237 241 private 238 242 def extract_params(url)