Permalink
Browse files

Call a block passed rake_tasks method in the self context

  • Loading branch information...
1 parent 3c81fc3 commit 7f8f554d75a4c1fe56fda1cbf39f67a0b32b5c16 @kennyj kennyj committed Nov 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails/railtie.rb
@@ -181,7 +181,7 @@ def load_console(app=self)
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

0 comments on commit 7f8f554

Please sign in to comment.