diff options
author | Dmitriy Plekhanov <onemanstartup@gmail.com> | 2017-05-19 22:42:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-19 22:42:02 +0300 |
commit | f1a740ef3cadd2c6cc5ceceb6fd46e2e6825b12b (patch) | |
tree | 08977d5a707e6e1b28de447c4a2654772ed3fff1 /actionview/app/assets | |
parent | c01ea3e54984f8ecc698af4a701483b560d616aa (diff) | |
download | rails-f1a740ef3cadd2c6cc5ceceb6fd46e2e6825b12b.tar.gz rails-f1a740ef3cadd2c6cc5ceceb6fd46e2e6825b12b.tar.bz2 rails-f1a740ef3cadd2c6cc5ceceb6fd46e2e6825b12b.zip |
Check for jQuery ajax
jQuery slim version doesn't have ajax, so if a person include this version ajaxFilter raises error.
Diffstat (limited to 'actionview/app/assets')
-rw-r--r-- | actionview/app/assets/javascripts/rails-ujs/start.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
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 |