diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-14 18:56:59 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-14 18:59:47 -0300 |
commit | 43f525031ad3f83a04f84e79bbe1de340bf937aa (patch) | |
tree | 7cebd9b2c551b64784c432961d2f5e58fb553931 /railties/lib/rails | |
parent | e8c66288d67eb86338b2e546068ec2d7f1e2a408 (diff) | |
download | rails-43f525031ad3f83a04f84e79bbe1de340bf937aa.tar.gz rails-43f525031ad3f83a04f84e79bbe1de340bf937aa.tar.bz2 rails-43f525031ad3f83a04f84e79bbe1de340bf937aa.zip |
Make console and generators blocks works at Application instance level
Like rake tasks and runner blocks these blocks should also being shared
between applications since they are stored at the classes.
Fixes #14748
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 8d080feb04..2fde974732 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -231,6 +231,18 @@ module Rails self.class.runner(&blk) end + # Sends any console called in the instance of a new application up + # to the +console+ method defined in Rails::Railtie. + def console(&blk) + self.class.console(&blk) + end + + # Sends any generators called in the instance of a new application up + # to the +generators+ method defined in Rails::Railtie. + def generators(&blk) + self.class.generators(&blk) + end + # Sends the +isolate_namespace+ method up to the class method. def isolate_namespace(mod) self.class.isolate_namespace(mod) |