Sha256: c16c4b8656d54c15dc6bfa1ea5cc3000b4c2136a2ebacd33c430f1bc5d215d3e

Contents?: true

Size: 667 Bytes

Versions: 5

Compression:

Stored size: 667 Bytes

Contents

module EditableComponents
  class Engine < ::Rails::Engine
    isolate_namespace EditableComponents

    @@edit_mode = false

    attr_accessor :edit_mode

    initializer 'editable_components.assets.precompile' do |app|
      app.config.assets.precompile += ['editable_components/application.css', 'editable_components/application.js', 'editable_components/icomoon.eot', 'editable_components/icomoon.svg', 'editable_components/icomoon.ttf', 'editable_components/icomoon.woff']
    end

    def self.css
      'editable_components/application' if Engine.edit_mode
    end

    def self.js
      'editable_components/application' if Engine.edit_mode
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
editable_components-0.1.6 lib/editable_components/engine.rb
editable_components-0.1.4 lib/editable_components/engine.rb
editable_components-0.1.3 lib/editable_components/engine.rb
editable_components-0.1.2 lib/editable_components/engine.rb
editable_components-0.1.0 lib/editable_components/engine.rb