diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-04 20:30:45 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-04 20:30:45 +0000 |
commit | ee1ad762a4eff7bd1c04abe2290311a4b93f5459 (patch) | |
tree | aa75dccf0fb32911e53b53cadcded85b77a8af5f /railties/lib/rails_generator/generators/components/scaffold | |
parent | 3953839e9958588aaa659213b6445f9ea6a55e0f (diff) | |
download | rails-ee1ad762a4eff7bd1c04abe2290311a4b93f5459.tar.gz rails-ee1ad762a4eff7bd1c04abe2290311a4b93f5459.tar.bz2 rails-ee1ad762a4eff7bd1c04abe2290311a4b93f5459.zip |
Added --skip-timestamps to generators that produce models (closes #10036) [tpope]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8070 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold')
-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 |