Skip to content

Commit

Permalink
Use jquery.min in production, rather than not-min in development
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Oct 13, 2010
1 parent b0122ae commit f686cb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jquery-rails.rb
Expand Up @@ -4,9 +4,9 @@ class Railtie < ::Rails::Railtie
config.before_configuration do
if ::Rails.root.join("public/javascripts/jquery-ui.min.js").exist?
jq_defaults = %w(jquery jquery-ui)
jq_defaults.map!{|a| a + ".min" } unless ::Rails.env.development?
jq_defaults.map!{|a| a + ".min" } if ::Rails.env.production?
else
jq_defaults = ::Rails.env.development? ? %w(jquery) : %w(jquery.min)
jq_defaults = ::Rails.env.production? ? %w(jquery.min) : %w(jquery)
end
config.action_view.javascript_expansions[:defaults] = jq_defaults + %w(rails)
end
Expand Down

0 comments on commit f686cb3

Please sign in to comment.