diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-08-06 08:49:00 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-08-06 08:49:00 +0200 |
commit | a8192119840c62bf2a0e564817c172191711b4b2 (patch) | |
tree | 432ae673ce2a219796a634f5769b151f1c0a3af4 /railties/lib/rails/generators/actions.rb | |
parent | ec54acd1e01374f0b5b495d7659181d7382e119e (diff) | |
parent | c294e91d00696e910e05ad1428ba3ce4884bc6a3 (diff) | |
download | rails-a8192119840c62bf2a0e564817c172191711b4b2.tar.gz rails-a8192119840c62bf2a0e564817c172191711b4b2.tar.bz2 rails-a8192119840c62bf2a0e564817c172191711b4b2.zip |
Merge pull request #16359 from skanev/after-bundle-in-rails-templates
Add an after_bundle callback in Rails templates
Conflicts:
railties/CHANGELOG.md
Diffstat (limited to 'railties/lib/rails/generators/actions.rb')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index a239874df0..4709914947 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -7,6 +7,7 @@ module Rails def initialize(*) # :nodoc: super @in_group = nil + @after_bundle_callbacks = [] end # Adds an entry into +Gemfile+ for the supplied gem. @@ -232,6 +233,16 @@ module Rails log File.read(find_in_source_paths(path)) end + # Registers a callback to be executed after bundle and spring binstubs + # have run. + # + # after_bundle do + # git add: '.' + # end + def after_bundle(&block) + @after_bundle_callbacks << block + end + protected # Define log for backwards compatibility. If just one argument is sent, |