diff options
author | kennyj <kennyj@gmail.com> | 2011-11-27 22:49:37 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2011-11-27 22:49:37 +0900 |
commit | 7f8f554d75a4c1fe56fda1cbf39f67a0b32b5c16 (patch) | |
tree | d3ef4dba2d2065075676a803e301361f3e02bf28 /railties/lib | |
parent | 3c81fc3b91ddfd4d115a7001640588eb93249261 (diff) | |
download | rails-7f8f554d75a4c1fe56fda1cbf39f67a0b32b5c16.tar.gz rails-7f8f554d75a4c1fe56fda1cbf39f67a0b32b5c16.tar.bz2 rails-7f8f554d75a4c1fe56fda1cbf39f67a0b32b5c16.zip |
Call a block passed rake_tasks method in the self context
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/railtie.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index f0991b99af..07a122e7d0 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -181,7 +181,7 @@ module Rails def load_tasks(app=self) extend Rake::DSL if defined? Rake::DSL - self.class.rake_tasks.each { |block| block.call(app) } + self.class.rake_tasks.each { |block| self.instance_exec(app, &block) } # load also tasks from all superclasses klass = self.class.superclass |