Last active
August 29, 2015 14:10
-
-
Save pepetox/fd8ccf2e55a90e5f983a to your computer and use it in GitHub Desktop.
Changes to make on rails 4 to can use as an api for angularjs, cordova ...
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
To open our rails app with devise to can be used as an API only need to change two things |
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 | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :null_session | |
end |
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
config.http_authenticatable = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment