diff options
Diffstat (limited to 'railties/lib/generators/active_record/model/model_generator.rb')
-rw-r--r-- | railties/lib/generators/active_record/model/model_generator.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/generators/active_record/model/model_generator.rb b/railties/lib/generators/active_record/model/model_generator.rb index 149ce281f3..d337ca4eec 100644 --- a/railties/lib/generators/active_record/model/model_generator.rb +++ b/railties/lib/generators/active_record/model/model_generator.rb @@ -11,10 +11,6 @@ module ActiveRecord class_option :timestamps, :type => :boolean class_option :parent, :type => :string, :desc => "The parent class for the generated model" - def create_model_file - template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") - end - def create_migration_file if options[:migration] && options[:parent].nil? file_name = "create_#{file_path.gsub(/\//, '_').pluralize}" @@ -22,6 +18,10 @@ module ActiveRecord end end + def create_model_file + template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") + end + hook_for :test_framework protected |