Class: SpreeReviews::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/spree_reviews.rb

Class Method Summary collapse

Class Method Details

.activateObject



9
10
11
12
13
14
15
# File 'lib/spree_reviews.rb', line 9

def self.activate
  Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
    Rails.env.production? ? require(c) : load(c)
  end
  ProductsHelper.send(:include, ReviewsHelper)
  Admin::ReviewsController.cache_sweeper :review_sweeper
end