From 8bf1f2525498c51b6bca7bdc6b19cb58c9303ba2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 27 Apr 2007 05:07:56 +0000 Subject: Name prefix should nest like path prefix git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/resources.rb | 2 +- actionpack/test/controller/resources_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb index 65755d247a..63f2b67755 100644 --- a/actionpack/lib/action_controller/resources.rb +++ b/actionpack/lib/action_controller/resources.rb @@ -45,7 +45,7 @@ module ActionController end def nesting_name_prefix - "#{singular}_" + "#{name_prefix}#{singular}_" end diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index 840cc98f30..8d5e68c420 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -208,7 +208,7 @@ class ResourcesTest < Test::Unit::TestCase :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 -- cgit v1.2.3