Skip to content

Instantly share code, notes, and snippets.

@jhtwong
jhtwong / gist:1029924
Created June 16, 2011 18:41
Rails::Application::Railties#all
def all(&block)
@railties_plus_engines ||= railties + engines
@railties_plus_engines.each(&block) if block
# Only after the block has been run against the railties and engines in the application
# will we call super with the block (which has the effect of running the block against the plugins in the
# application and returning the array of plugins)
@railties_plus_engines + super(&block)
end