Created
March 10, 2017 07:49
-
-
Save Martin91/d3ebb72fa83c60155d216f1be34791a7 to your computer and use it in GitHub Desktop.
rails application decorator mechanism
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment