Sha256: fcc60d94b37fecf652bf59e701087a55bc6cb603b88fef400504bdf0c98f808b

Contents?: true

Size: 596 Bytes

Versions: 3

Compression:

Stored size: 596 Bytes

Contents

module SpreeFaq
  class Engine < Rails::Engine
    require 'spree/core'
    isolate_namespace Spree
    engine_name 'spree_faq'

    config.autoload_paths += %W(#{config.root}/lib)

    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree-faq-2.2.0 lib/spree_faq/engine.rb
spree-faq-2.1.0 lib/spree_faq/engine.rb
spree-faq-2.0.0 lib/spree_faq/engine.rb