Permalink
Browse files

load_generators from engine should also handle self automatically.

  • Loading branch information...
josevalim committed Jun 15, 2011
1 parent 078bdc6 commit 6c3e80af685393b1069b96af3193625137e9b29e
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/rails/railtie.rb
@@ -174,11 +174,11 @@ def config
def eager_load!
end
- def load_console(app)
+ def load_console(app=self)
self.class.console.each { |block| block.call(app) }
end
- def load_tasks(app)
+ def load_tasks(app=self)
extend Rake::DSL if defined? Rake::DSL
self.class.rake_tasks.each { |block| block.call(app) }
@@ -190,7 +190,7 @@ def load_tasks(app)
end
end
- def load_generators(app)
+ def load_generators(app=self)
self.class.generators.each { |block| block.call(app) }
end

0 comments on commit 6c3e80a

Please sign in to comment.