Sha256: 1753e3d9eca5b0d0f706508265e99ab183cb30275ac9c799f02f3f584ebb1453

Contents?: true

Size: 495 Bytes

Versions: 2

Compression:

Stored size: 495 Bytes

Contents

module <%= class_name %>
  class Engine < Rails::Engine
    require "solidus_core"
    isolate_namespace Spree
    engine_name '<%= file_name %>'

    # use rspec for tests
    config.generators do |g|
      g.test_framework :rspec
    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
    end

    config.to_prepare &method(:activate).to_proc
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_cmd-1.1.0 lib/solidus_cmd/templates/extension/lib/%file_name%/engine.rb.tt
solidus_cmd-0.1.0 lib/solidus_cmd/templates/extension/lib/%file_name%/engine.rb.tt