Skip to content

Commit

Permalink
Merge pull request #29151 from onemanstartup/jquery_slim_fix
Browse files Browse the repository at this point in the history
Check for jQuery ajax
  • Loading branch information
guilleiguaran authored and rafaelfranca committed May 30, 2017
1 parent 55c3e1f commit 56d78d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionview/app/assets/javascripts/rails-ujs/start.coffee
Expand Up @@ -9,7 +9,7 @@
} = Rails } = Rails


# For backward compatibility # For backward compatibility
if jQuery? and not jQuery.rails if jQuery? and jQuery.ajax? and not jQuery.rails
jQuery.rails = Rails jQuery.rails = Rails
jQuery.ajaxPrefilter (options, originalOptions, xhr) -> jQuery.ajaxPrefilter (options, originalOptions, xhr) ->
CSRFProtection(xhr) unless options.crossDomain CSRFProtection(xhr) unless options.crossDomain
Expand Down

0 comments on commit 56d78d7

Please sign in to comment.