Skip to content
This repository
Browse code

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...
commit 8bf1f2525498c51b6bca7bdc6b19cb58c9303ba2 1 parent 0adf4a9
David Heinemeier Hansson authored April 27, 2007
2  actionpack/lib/action_controller/resources.rb
@@ -45,7 +45,7 @@ def nesting_path_prefix
45 45
       end
46 46
       
47 47
       def nesting_name_prefix
48  
-        "#{singular}_"
  48
+        "#{name_prefix}#{singular}_"
49 49
       end
50 50
 
51 51
 
2  actionpack/test/controller/resources_test.rb
@@ -208,7 +208,7 @@ def test_nested_restful_routes
208 208
         :path_prefix => 'threads/1/',
209 209
         :options => { :thread_id => '1' }
210 210
       assert_simply_restful_for :comments,
211  
-        :name_prefix => 'message_',
  211
+        :name_prefix => 'thread_message_',
212 212
         :path_prefix => 'threads/1/messages/2/',
213 213
         :options => { :thread_id => '1', :message_id => '2' }
214 214
     end

0 notes on commit 8bf1f25

Please sign in to comment.
Something went wrong with that request. Please try again.