2011-02-09 21:03:53 +00:00
|
|
|
require 'cocoon/view_helpers'
|
|
|
|
|
|
|
|
module Cocoon
|
2011-07-23 21:42:01 +00:00
|
|
|
class Engine < ::Rails::Engine
|
2011-02-09 21:03:53 +00:00
|
|
|
|
|
|
|
config.before_initialize do
|
|
|
|
config.action_view.javascript_expansions[:cocoon] = %w(cocoon)
|
|
|
|
end
|
|
|
|
|
|
|
|
# configure our plugin on boot
|
|
|
|
initializer "cocoon.initialize" do |app|
|
|
|
|
ActionView::Base.send :include, Cocoon::ViewHelpers
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|