diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-12-10 22:16:34 +0100 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:28 +0530 |
commit | 0dc39cd8ee24466f204a292ae61643ce3b3b4c32 (patch) | |
tree | 9e2b3ac8e535e1f9ab41665969d2eb058030ee6b /railties/lib/rails/generators | |
parent | e6928e8c35bfc22425916f334e9482f955bc8907 (diff) | |
download | rails-0dc39cd8ee24466f204a292ae61643ce3b3b4c32.tar.gz rails-0dc39cd8ee24466f204a292ae61643ce3b3b4c32.tar.bz2 rails-0dc39cd8ee24466f204a292ae61643ce3b3b4c32.zip |
Skip creating migration if --skip option is passed to model generator [#6144 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/migration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/migration.rb b/railties/lib/rails/generators/migration.rb index 8d98909055..0c5c4f6e09 100644 --- a/railties/lib/rails/generators/migration.rb +++ b/railties/lib/rails/generators/migration.rb @@ -52,7 +52,7 @@ module Rails destination = self.class.migration_exists?(migration_dir, @migration_file_name) - if behavior == :invoke + if !(destination && options[:skip]) && behavior == :invoke if destination && options.force? remove_file(destination) elsif destination |