diff options
Diffstat (limited to 'activerecord/lib/rails/generators/active_record/model/model_generator.rb')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/model/model_generator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/rails/generators/active_record/model/model_generator.rb b/activerecord/lib/rails/generators/active_record/model/model_generator.rb index 3e72fbeca8..539c2517ee 100644 --- a/activerecord/lib/rails/generators/active_record/model/model_generator.rb +++ b/activerecord/lib/rails/generators/active_record/model/model_generator.rb @@ -20,6 +20,11 @@ module ActiveRecord template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end + def create_module_file + return if class_path.empty? + template 'module.rb', File.join('app/models', "#{class_path.join('/')}.rb") + end + hook_for :test_framework protected |