diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-06-02 12:24:31 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-06-02 12:24:31 -0400 |
commit | 62d316c6d88595940d6da08b3e6c97f9ca2aec1d (patch) | |
tree | 49ae0076ff12a85d588857ef2864dbf1dd09cc81 /actionview/app | |
parent | feefa9fc9803780713f61c6eded0785e3844a681 (diff) | |
parent | f7388635f246b97a1aa0be54579339c6659fb865 (diff) | |
download | rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.tar.gz rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.tar.bz2 rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.zip |
Merge branch 'master' into unlock-minitest
Diffstat (limited to 'actionview/app')
-rw-r--r-- | actionview/app/assets/javascripts/README.md | 5 | ||||
-rw-r--r-- | actionview/app/assets/javascripts/rails-ujs/start.coffee | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/actionview/app/assets/javascripts/README.md b/actionview/app/assets/javascripts/README.md index 0819d5da5f..f321b9f720 100644 --- a/actionview/app/assets/javascripts/README.md +++ b/actionview/app/assets/javascripts/README.md @@ -30,7 +30,7 @@ Run `yarn add rails-ujs` to install the rails-ujs package. Usage ------------ -Require `rails-ujs` into your application.js manifest. +Require `rails-ujs` in your application.js manifest. ```javascript //= require rails-ujs @@ -39,7 +39,8 @@ Require `rails-ujs` into your application.js manifest. Usage with yarn ------------ -When using with Webpacker gem or your preferred JavaScript bundler. Just add the following to your main JS file and compile. +When using with the Webpacker gem or your preferred JavaScript bundler, just +add the following to your main JS file and compile. ```javascript import Rails from 'rails-ujs'; diff --git a/actionview/app/assets/javascripts/rails-ujs/start.coffee b/actionview/app/assets/javascripts/rails-ujs/start.coffee index 5746a22287..55595ac96f 100644 --- a/actionview/app/assets/javascripts/rails-ujs/start.coffee +++ b/actionview/app/assets/javascripts/rails-ujs/start.coffee @@ -9,7 +9,7 @@ } = Rails # For backward compatibility -if jQuery? and not jQuery.rails +if jQuery? and jQuery.ajax? and not jQuery.rails jQuery.rails = Rails jQuery.ajaxPrefilter (options, originalOptions, xhr) -> CSRFProtection(xhr) unless options.crossDomain |