Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7426

Show
Ignore:
Timestamp:
09/09/07 18:00:55 (1 year ago)
Author:
david
Message:

Removed the deprecated ActionController#Base.template_root/= methods (use ActionController#Base.view_paths/= instead) [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/base.rb

    r7415 r7426  
    381381      end 
    382382       
    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 
    395384      @@view_paths = {} 
    396385       
  • trunk/actionpack/test/controller/view_paths_test.rb

    r7403 r7426  
    7171  end 
    7272   
    73   def test_template_root_deprecated 
    74     assert_deprecated(/template_root.*view_paths/) do 
    75       TestController.template_root = 'foo/bar' 
    76     end 
    77     assert_deprecated(/template_root.*view_paths/) do 
    78       assert_equal 'foo/bar', TestController.template_root 
    79       assert_equal ['foo/bar', LOAD_PATH_ROOT], TestController.view_paths 
    80     end 
    81   end 
    82    
    8373  def test_inheritance 
    8474    original_load_paths = ActionController::Base.view_paths