mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Call a block passed rake_tasks method in the self context
This commit is contained in:
parent
3c81fc3b91
commit
7f8f554d75
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue