diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-17 15:52:32 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-18 17:08:24 -0300 |
commit | b9fcce3944653db5eb49119c134e8525e91f7aee (patch) | |
tree | d7f52ceff25a8faf094ddd6a3ecaffde191d2280 /railties/lib/rails/generators/actions | |
parent | 7b71d8cfabe71dc9cf265809eed51e6956b60b7f (diff) | |
download | rails-b9fcce3944653db5eb49119c134e8525e91f7aee.tar.gz rails-b9fcce3944653db5eb49119c134e8525e91f7aee.tar.bz2 rails-b9fcce3944653db5eb49119c134e8525e91f7aee.zip |
Merge pull request #17302 from claudiob/replace-slower-block-call-with-faster-yield
Replace (slower) block.call with (faster) yield
Diffstat (limited to 'railties/lib/rails/generators/actions')
-rw-r--r-- | railties/lib/rails/generators/actions/create_migration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions/create_migration.rb b/railties/lib/rails/generators/actions/create_migration.rb index 682092fdf2..cffdef6ec9 100644 --- a/railties/lib/rails/generators/actions/create_migration.rb +++ b/railties/lib/rails/generators/actions/create_migration.rb @@ -39,7 +39,7 @@ module Rails protected - def on_conflict_behavior(&block) + def on_conflict_behavior options = base.options.merge(config) if identical? say_status :identical, :blue, relative_existing_migration @@ -48,7 +48,7 @@ module Rails say_status :create, :green unless pretend? ::FileUtils.rm_rf(existing_migration) - block.call + yield end elsif options[:skip] say_status :skip, :yellow |