Skip to content

Instantly share code, notes, and snippets.

@pepetox
Last active August 29, 2015 14:10
Show Gist options
  • Save pepetox/fd8ccf2e55a90e5f983a to your computer and use it in GitHub Desktop.
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 ...
To open our rails app with devise to can be used as an API only need to change two things
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
config.http_authenticatable = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment