diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-03-20 13:25:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 13:25:27 -0400 |
commit | 2dfe8f1f84b7c4ff6673e7035adbeecaf31734b0 (patch) | |
tree | c6ffae57858d75097fe62cf4b1e537cf140cab1d /railties/lib/rails/engine | |
parent | 30fd30e7ece79c2f4cbd6c0b6cd74471c652423e (diff) | |
parent | a42351acbc5406ab0825befe641144b4cb1ee6bf (diff) | |
download | rails-2dfe8f1f84b7c4ff6673e7035adbeecaf31734b0.tar.gz rails-2dfe8f1f84b7c4ff6673e7035adbeecaf31734b0.tar.bz2 rails-2dfe8f1f84b7c4ff6673e7035adbeecaf31734b0.zip |
Merge pull request #28486 from y-yagi/add_app_update_for_rails_engine
Add `app:update` task to engines
Diffstat (limited to 'railties/lib/rails/engine')
-rw-r--r-- | railties/lib/rails/engine/updater.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/railties/lib/rails/engine/updater.rb b/railties/lib/rails/engine/updater.rb new file mode 100644 index 0000000000..2ecf994a5c --- /dev/null +++ b/railties/lib/rails/engine/updater.rb @@ -0,0 +1,19 @@ +require "rails/generators" +require "rails/generators/rails/plugin/plugin_generator" + +module Rails + class Engine + class Updater + class << self + def generator + @generator ||= Rails::Generators::PluginGenerator.new ["plugin"], + { engine: true }, destination_root: ENGINE_ROOT + end + + def run(action) + generator.send(action) + end + end + end + end +end |