diff options
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb index 6f154fe52d..d9ce668f2e 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb @@ -1,5 +1,5 @@ class ScaffoldGenerator < Rails::Generator::NamedBase - default_options :skip_migration => false + default_options :skip_timestamps => false, :skip_migration => false attr_reader :controller_name, :controller_class_path, @@ -76,6 +76,8 @@ class ScaffoldGenerator < Rails::Generator::NamedBase def add_options!(opt) opt.separator '' opt.separator 'Options:' + opt.on("--skip-timestamps", + "Don't add timestamps to the migration file for this model") { |v| options[:skip_timestamps] = v } opt.on("--skip-migration", "Don't generate a migration file for this model") { |v| options[:skip_migration] = v } end |