Friday, December 17, 2010

the order of javascript_include_tag

I had this in my main layouts

= javascript_include_tag :defaults, "jquery", "jquery-ui", "json", "custom_helpers"

and everything was find in development environment. However in production things where wrong. rails.js was throwing an error about jquery not existing. So I changed it to this

= javascript_include_tag "jquery", "jquery-ui", "json", "custom_helpers"
= javascript_include_tag :defaults

And all was good again.

No comments:

Post a Comment