Merge pull request #120 from virusman/rails4

Make sure javascript_expansions config option exists
This commit is contained in:
Nathan Van der Auwera 2013-01-22 13:04:08 -08:00
commit d4f59eb5eb
1 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,9 @@ module Cocoon
class Engine < ::Rails::Engine
config.before_initialize do
config.action_view.javascript_expansions[:cocoon] = %w(cocoon)
if config.action_view.javascript_expansions
config.action_view.javascript_expansions[:cocoon] = %w(cocoon)
end
end
# configure our plugin on boot