Sha256: 6da7a6d9002be2138a454ba3a7e0075565dafb523e31751c8819275136a66c6a

Contents?: true

Size: 354 Bytes

Versions: 54

Compression:

Stored size: 354 Bytes

Contents

Para.ajax = (options = {}) ->
  csrfParam = $('meta[name="csrf-param"]').attr('content')
  csrfToken = $('meta[name="csrf-token"]').attr('content')

  csrfOptions = {}
  csrfOptions[csrfParam] = csrfToken if csrfParam and csrfToken

  unless options.method and options.method.match(/get/i)
    options = $.extend(csrfOptions, options)

  $.ajax(options)

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
para-0.11.4 app/assets/javascripts/para/lib/ajax.coffee
para-0.11.3 app/assets/javascripts/para/lib/ajax.coffee
para-0.11.2 app/assets/javascripts/para/lib/ajax.coffee
para-0.11.1 app/assets/javascripts/para/lib/ajax.coffee
para-0.11.0 app/assets/javascripts/para/lib/ajax.coffee
para-0.10.0 app/assets/javascripts/para/lib/ajax.coffee
para-0.9.4 app/assets/javascripts/para/lib/ajax.coffee
para-0.9.3.3 app/assets/javascripts/para/lib/ajax.coffee
para-0.9.3.2 app/assets/javascripts/para/lib/ajax.coffee
para-0.9.3.1 app/assets/javascripts/para/lib/ajax.coffee
para-0.9.2 app/assets/javascripts/para/lib/ajax.coffee
para-0.9.0 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.15 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.14 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.13 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.12 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.11 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.10 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.9 app/assets/javascripts/para/lib/ajax.coffee
para-0.8.8 app/assets/javascripts/para/lib/ajax.coffee