Changeset 7426
- Timestamp:
- 09/09/07 18:00:55 (1 year ago)
- Files:
-
- trunk/actionpack/lib/action_controller/base.rb (modified) (1 diff)
- trunk/actionpack/test/controller/view_paths_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/base.rb
r7415 r7426 381 381 end 382 382 383 # Deprecated. Use view_paths instead. 384 def template_root=(path) 385 prepend_view_path path 386 template_root 387 end 388 389 # Deprecated. Use view_paths instead. 390 def template_root 391 view_paths.first 392 end 393 deprecate :template_root => :view_paths 394 383 395 384 @@view_paths = {} 396 385 trunk/actionpack/test/controller/view_paths_test.rb
r7403 r7426 71 71 end 72 72 73 def test_template_root_deprecated74 assert_deprecated(/template_root.*view_paths/) do75 TestController.template_root = 'foo/bar'76 end77 assert_deprecated(/template_root.*view_paths/) do78 assert_equal 'foo/bar', TestController.template_root79 assert_equal ['foo/bar', LOAD_PATH_ROOT], TestController.view_paths80 end81 end82 83 73 def test_inheritance 84 74 original_load_paths = ActionController::Base.view_paths