Sha256: a23a344c9b4c38d24a4123d747f07140140af6043a9a2d9d0c9406492156f00e

Contents?: true

Size: 517 Bytes

Versions: 3

Compression:

Stored size: 517 Bytes

Contents

module Jquery
  module Rails
    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?
        else
          jq_defaults = ::Rails.env.development? ? %w(jquery) : %w(jquery.min)
        end
        config.action_view.javascript_expansions[:defaults] = jq_defaults + %w(rails)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jquery-rails-0.2.2 lib/jquery-rails.rb
jquery-rails-0.2.1 lib/jquery-rails.rb
jquery-rails-0.2 lib/jquery-rails.rb