Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ApplicationController < ActionController::Base
- protect_from_forgery
- # look for a better way to allow JSON requests w/o CSRF token from devices
- skip_before_filter :verify_authenticity_token, if: :json_request?
- protected
- def json_request?
- request.format.json?
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement