Sha256: 9560df719bc44419042a81c28764d03306e176bb99647cb0384fabfe0bd8b0e2

Contents?: true

Size: 534 Bytes

Versions: 12

Compression:

Stored size: 534 Bytes

Contents

module Chartkick
  class Engine < ::Rails::Engine
    initializer "precompile", group: :all do |app|
      if defined?(Sprockets) && Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new("4.0.0.beta1")
        app.config.assets.precompile << "chartkick.js"
      else
        # use a proc instead of a string
        app.config.assets.precompile << proc { |path| path == "chartkick.js" }
      end
    end

    initializer "helper" do
      ActiveSupport.on_load(:action_view) do
        include Helper
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
chartkick-2.2.3 lib/chartkick/engine.rb
chartkick-2.2.2 lib/chartkick/engine.rb
chartkick-2.2.1 lib/chartkick/engine.rb
chartkick-2.2.0 lib/chartkick/engine.rb
chartkick-2.1.3 lib/chartkick/engine.rb
chartkick-2.1.2 lib/chartkick/engine.rb
chartkick-2.1.1 lib/chartkick/engine.rb
chartkick-2.1.0 lib/chartkick/engine.rb
chartkick-2.0.2 lib/chartkick/engine.rb
chartkick-2.0.1 lib/chartkick/engine.rb
chartkick-2.0.0 lib/chartkick/engine.rb
chartkick-1.5.2 lib/chartkick/engine.rb