Skip to content

Commit

Permalink
Removed the deprecated ActionController#Base.template_root/= methods …
Browse files Browse the repository at this point in the history
…(use ActionController#Base.view_paths/= instead) [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Sep 9, 2007
1 parent 85800c1 commit 89b7630
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
13 changes: 1 addition & 12 deletions actionpack/lib/action_controller/base.rb
Expand Up @@ -380,18 +380,7 @@ def hide_action(*names)
write_inheritable_attribute(:hidden_actions, hidden_actions | names.collect { |n| n.to_s })
end

# Deprecated. Use view_paths instead.
def template_root=(path)
prepend_view_path path
template_root
end

# Deprecated. Use view_paths instead.
def template_root
view_paths.first
end
deprecate :template_root => :view_paths


@@view_paths = {}

# View load paths determine the bases from which template references can be made. So a call to
Expand Down
10 changes: 0 additions & 10 deletions actionpack/test/controller/view_paths_test.rb
Expand Up @@ -70,16 +70,6 @@ def test_view_paths_override_at_request_time
assert_equal "Hello overridden world!", @response.body
end

def test_template_root_deprecated
assert_deprecated(/template_root.*view_paths/) do
TestController.template_root = 'foo/bar'
end
assert_deprecated(/template_root.*view_paths/) do
assert_equal 'foo/bar', TestController.template_root
assert_equal ['foo/bar', LOAD_PATH_ROOT], TestController.view_paths
end
end

def test_inheritance
original_load_paths = ActionController::Base.view_paths

Expand Down

0 comments on commit 89b7630

Please sign in to comment.