Sha256: 08e164d5b7f3311a49c8588d56e8b5b4e1c4d60db1d78213d3600e85980cee85

Contents?: true

Size: 464 Bytes

Versions: 9

Compression:

Stored size: 464 Bytes

Contents

require 'cocoon/view_helpers'

module Cocoon
  class Engine < ::Rails::Engine

    config.before_initialize do
      if config.action_view.javascript_expansions
        config.action_view.javascript_expansions[:cocoon] = %w(cocoon)
      end
    end

    # configure our plugin on boot
    initializer "cocoon.initialize" do |app|
      ActiveSupport.on_load :action_view do
        ActionView::Base.send :include, Cocoon::ViewHelpers
      end
    end

  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/lib/cocoon.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/lib/cocoon.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/lib/cocoon.rb
cocoon-1.2.15 lib/cocoon.rb
cocoon-1.2.14 lib/cocoon.rb
cocoon-1.2.13 lib/cocoon.rb
cocoon-1.2.12 lib/cocoon.rb
cocoon-1.2.11 lib/cocoon.rb
cocoon-1.2.10 lib/cocoon.rb