diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-01-29 19:15:28 -0500 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-01-29 19:15:28 -0500 |
commit | 6162c49e40582bf058a6bb82ccc0cfb8f92332b6 (patch) | |
tree | ed13afd4af5df0f49418cad58fafd2febfa3f2b6 /railties/lib | |
parent | 513f72804d800bb9a028f6ffc66ab1a0b45df26f (diff) | |
parent | 92e565825d102a0f4d6ed2368d9510008da1da21 (diff) | |
download | rails-6162c49e40582bf058a6bb82ccc0cfb8f92332b6.tar.gz rails-6162c49e40582bf058a6bb82ccc0cfb8f92332b6.tar.bz2 rails-6162c49e40582bf058a6bb82ccc0cfb8f92332b6.zip |
Merge pull request #23317 from rfmanuel/after-bundle-in-rails-plugin-template
Add an after_bundle callback in Rails plugin templates
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index 0c7a73a54e..b5e836b584 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -259,6 +259,12 @@ task default: :test public_task :apply_rails_template, :run_bundle + def run_after_bundle_callbacks + @after_bundle_callbacks.each do |callback| + callback.call + end + end + def name @name ||= begin # same as ActiveSupport::Inflector#underscore except not replacing '-' |