Permalink
Browse files

Make generation of namespaced models produce proper migrations #4219

…[Caio Chassot]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3947 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 74f0224 commit f6786f8dccc6f6ca91a08c3cbfa80625f9c6c993 @dhh dhh committed Mar 18, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/lib/rails_generator/generators/components/model/model_generator.rb
@@ -18,8 +18,8 @@ def manifest
unless options[:skip_migration]
m.migration_template 'migration.rb', 'db/migrate', :assigns => {
- :migration_name => "Create#{class_name.pluralize}"
- }, :migration_file_name => "create_#{file_name.pluralize}"
+ :migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}"
+ }, :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}"
end
end
end

0 comments on commit f6786f8

Please sign in to comment.