aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-10-09 02:19:58 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-10-09 02:19:58 +0000
commita21e86f023812f7dafa6e97d44e281b66e2ac01f (patch)
tree55e9ebe87ea739c670d2f206a837b8178bba1cd4 /railties/lib
parentfe4d5ea786aa82426735b081b6f1581678222814 (diff)
downloadrails-a21e86f023812f7dafa6e97d44e281b66e2ac01f.tar.gz
rails-a21e86f023812f7dafa6e97d44e281b66e2ac01f.tar.bz2
rails-a21e86f023812f7dafa6e97d44e281b66e2ac01f.zip
Fixed migration creation to work with namespaced models, so script/generate model Gallery::Image will use create_table :gallery_images #6327 [BobSilva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5261 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails_generator/base.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails_generator/base.rb b/railties/lib/rails_generator/base.rb
index f8da8ad032..4d0b064176 100644
--- a/railties/lib/rails_generator/base.rb
+++ b/railties/lib/rails_generator/base.rb
@@ -183,6 +183,7 @@ module Rails
if @class_nesting.empty?
@class_name = @class_name_without_nesting
else
+ @table_name = @class_nesting.underscore << "_" << @table_name
@class_name = "#{@class_nesting}::#{@class_name_without_nesting}"
end
end