Make sure javascript_expansions config option exists

This commit is contained in:
virusman 2013-01-23 00:33:44 +04:00
parent aac7105f04
commit de1acdf930
1 changed files with 3 additions and 1 deletions

View File

@ -4,8 +4,10 @@ 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|