Merge pull request #120 from virusman/rails4
Make sure javascript_expansions config option exists
This commit is contained in:
commit
d4f59eb5eb
|
@ -4,8 +4,10 @@ module Cocoon
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
|
|
||||||
config.before_initialize do
|
config.before_initialize do
|
||||||
|
if config.action_view.javascript_expansions
|
||||||
config.action_view.javascript_expansions[:cocoon] = %w(cocoon)
|
config.action_view.javascript_expansions[:cocoon] = %w(cocoon)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# configure our plugin on boot
|
# configure our plugin on boot
|
||||||
initializer "cocoon.initialize" do |app|
|
initializer "cocoon.initialize" do |app|
|
||||||
|
|
Loading…
Reference in New Issue