Skip to content

Instantly share code, notes, and snippets.

@luxxi
Created April 5, 2015 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxxi/22a7d5bee3b9a2bc3c36 to your computer and use it in GitHub Desktop.
Save luxxi/22a7d5bee3b9a2bc3c36 to your computer and use it in GitHub Desktop.
Can't verify CSRF token authenticity
class ApplicationController < ActionController::Base
protect_from_forgery with: :null_session, if: Proc.new { |c| c.request.format == 'application/json' }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment