Skip to content

Instantly share code, notes, and snippets.

@cbrunsdon
Created June 5, 2013 18:00
Show Gist options
  • Save cbrunsdon/5715861 to your computer and use it in GitHub Desktop.
Save cbrunsdon/5715861 to your computer and use it in GitHub Desktop.
config.to_prepare do
# Load application's model / class decorators
['lib', 'app'].each do |dir|
Dir.glob(File.join(File.dirname(__FILE__), "../#{dir}/**/*_decorator*.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