lib/spree_faq/engine.rb in spree-faq-2.1.1 vs lib/spree_faq/engine.rb in spree-faq-2.2.0

- old
+ new

@@ -4,17 +4,18 @@ isolate_namespace Spree engine_name 'spree_faq' config.autoload_paths += %W(#{config.root}/lib) - class << self - def activate - cache_klasses = %W(#{config.root}/app/**/*_decorator*.rb #{config.root}/app/overrides/*.rb) - Dir.glob(cache_klasses) do |klass| - Rails.configuration.cache_classes ? require(klass) : load(klass) - end + def self.activate + Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c| + Rails.configuration.cache_classes ? require(c) : load(c) end + + Dir.glob(File.join(File.dirname(__FILE__), '../../app/overrides/*.rb')) do |c| + Rails.configuration.cache_classes ? require(c) : load(c) + end end - config.to_prepare(&method(:activate).to_proc) + config.to_prepare &method(:activate).to_proc end -end +end \ No newline at end of file