Skip to content

Commit

Permalink
load_generators from engine should also handle self automatically.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jun 15, 2011
1 parent 078bdc6 commit 6c3e80a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/lib/rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }

Expand All @@ -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

Expand Down

0 comments on commit 6c3e80a

Please sign in to comment.