18 lines
407 B
Ruby
18 lines
407 B
Ruby
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|
|
|
ActionView::Base.send :include, Cocoon::ViewHelpers
|
|
end
|
|
|
|
end
|
|
end |