module JqueryCdn::RailsHelpers

Public Instance Methods

include_jquery(options = { }) click to toggle source

Return <script> tags to add jQuery in Rails

# File lib/jquery-cdn/railties.rb, line 8
def include_jquery(options = { })
  options = { env: Rails.env.to_sym }.merge(options)
  JqueryCdn.local_url = proc { javascript_path("jquery.js") }
  JqueryCdn.include_jquery(options).html_safe
end