Created
March 28, 2019 11:50
-
-
Save MaryKuz/25b02daf4c0a9cf898c419c670583473 to your computer and use it in GitHub Desktop.
Add code to ApplicationController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
... | |
skip_before_action :verify_authenticity_token, if: :json_request? | |
private | |
def json_request? | |
request.format.json? | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment