diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 8ea81f7cd2..cf88791b07 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,9 @@ *SVN* +* Fixed migration creation to work with namespaced models, so script/generate model Gallery::Image will use create_table :gallery_images #6327 [BobSilva] + +* Fixed rename_table on SQLite tables with indexes defined #5942 [brandon@opensoul.org] + * Added default timeout setting of 5 seconds to SQLite3 database.yml configurations [DHH] * Added generated attribute options to script/generate model, like the one found in scaffold_resource and resource [DHH]. Examples: 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 @@ def assign_names!(name) 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