Sha256: 1dd496617987875907ac50ac3854a45084b8ff35d780897a401850300245d1c6
Contents?: true
Size: 351 Bytes
Versions: 8
Compression:
Stored size: 351 Bytes
Contents
require ['jquery'], ($) -> # TODO use prefilter instead of beforeSend # $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }}); $.ajaxSetup beforeSend: (xhr) -> token = $('meta[name="csrf-token"]').attr('content') token and xhr.setRequestHeader 'X-CSRF-Token', token
Version data entries
8 entries across 8 versions & 1 rubygems