Permalink
Browse files

Name prefix should nest like path prefix

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 0adf4a9 commit 8bf1f2525498c51b6bca7bdc6b19cb58c9303ba2 @dhh dhh committed Apr 27, 2007
Showing with 2 additions and 2 deletions.
  1. +1 −1 actionpack/lib/action_controller/resources.rb
  2. +1 −1 actionpack/test/controller/resources_test.rb
View
2 actionpack/lib/action_controller/resources.rb
@@ -45,7 +45,7 @@ def nesting_path_prefix
end
def nesting_name_prefix
- "#{singular}_"
+ "#{name_prefix}#{singular}_"
end
View
2 actionpack/test/controller/resources_test.rb
@@ -208,7 +208,7 @@ def test_nested_restful_routes
:path_prefix => 'threads/1/',
:options => { :thread_id => '1' }
assert_simply_restful_for :comments,
- :name_prefix => 'message_',
+ :name_prefix => 'thread_message_',
:path_prefix => 'threads/1/messages/2/',
:options => { :thread_id => '1', :message_id => '2' }
end

0 comments on commit 8bf1f25

Please sign in to comment.