Skip to content

Instantly share code, notes, and snippets.

@kalabiyau
Created July 19, 2012 08:11
Show Gist options
  • Save kalabiyau/3141514 to your computer and use it in GitHub Desktop.
Save kalabiyau/3141514 to your computer and use it in GitHub Desktop.
config.to_prepare do
# Load application's model / class decorators
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
# Load application's view overrides
Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment