Sha256: 912faf3d4ef4bf403dc7a62ff23221e496ec88ac25666b7be538b5d9dba08995
Contents?: true
Size: 408 Bytes
Versions: 48
Compression:
Stored size: 408 Bytes
Contents
lazy_require = 'jquery' define 'config/initializers/jquery', [lazy_require], ($) -> # 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
48 entries across 48 versions & 1 rubygems