Skip to content

Instantly share code, notes, and snippets.

@radar
Created November 19, 2012 22:55
Show Gist options
  • Save radar/4114642 to your computer and use it in GitHub Desktop.
Save radar/4114642 to your computer and use it in GitHub Desktop.
Dir.glob(File.join(File.dirname(__FILE__), "../../../app/**/*_decorator*.rb")) do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
@rthbound
Copy link

Thank you, sir... didn't like the ../../.. bit, so I forked and used Rails.root.join() instead...

based on the 6-spaced indentation I'm assuming this goes inside class Application < Rails::Application

@rthbound
Copy link

oops, it goes inside of that ^, but also inside of config.after_initialize {...}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment