1628bb19d3
- moved cocoon.js to app/assets/javascripts - adapted install-generator accordingly (for rails 3.0.x) - made it an engine instead of railtie (to use the asset pipeline)
16 lines
345 B
Ruby
16 lines
345 B
Ruby
require 'cocoon/view_helpers'
|
|
|
|
module Cocoon
|
|
class Engine < ::Rails::Engine
|
|
|
|
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 |