Sha256: 6a4ed2577905675708545ca80b69557e85f63e894fe201ba51c64dcd960efc43

Contents?: true

Size: 464 Bytes

Versions: 5

Compression:

Stored size: 464 Bytes

Contents

module Evercookie
  # adds additional things to rails engine
  module Rails
    # adds additional things to rails engine
    class Engine < ::Rails::Engine
      # adds ec.js to be precompiled
      initializer "evercookie precompile hook" do |app|
        app.config.assets.precompile << /ec\.js/
      end

      # registers view helpers
      config.after_initialize do
        ActionView::Base.send(:include, Evercookie::ViewHelper)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
evercookie-0.1.2 lib/evercookie/engine.rb
evercookie-0.1.1 lib/evercookie/engine.rb
evercookie-0.1.0 lib/evercookie/engine.rb
evercookie-0.0.6 lib/evercookie/engine.rb
evercookie-0.0.5 lib/evercookie/engine.rb