lib/padrino-gen/generators/model.rb in padrino-gen-0.7.9 vs lib/padrino-gen/generators/model.rb in padrino-gen-0.8.0
- old
+ new
@@ -35,10 +35,10 @@
self.behavior = :revoke if options[:destroy]
include_component_module_for(:orm)
include_component_module_for(:test)
migration_name = "create_#{name.pluralize.underscore}"
create_model_file(name, fields)
- generate_model_test(name)
+ generate_model_test(name) if test?
create_model_migration(migration_name, name, fields) unless options[:skip_migration]
else
say "You are not at the root of a Padrino application! (config/boot.rb not found)" and return unless in_app_root?
end
end