Skip to content

Instantly share code, notes, and snippets.

@radar
Forked from brunoalano/application_controller.rb
Last active November 17, 2015 21:36
Show Gist options
  • Save radar/6ea294f399e9ef139c8a to your computer and use it in GitHub Desktop.
Save radar/6ea294f399e9ef139c8a to your computer and use it in GitHub Desktop.
Path: app/controllers/company/api/application_controller.rb
module Company
module Api
class ApplicationController < Company::ApplicationController
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :null_session
# Disable Layout
layout false
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment