Skip to content

Instantly share code, notes, and snippets.

@traviskroberts
Created May 8, 2013 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save traviskroberts/38e4cdc8731c381f671a to your computer and use it in GitHub Desktop.
Save traviskroberts/38e4cdc8731c381f671a to your computer and use it in GitHub Desktop.
class Api::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
private
def require_user
unless current_user
render(:json => {:message => 'Authentication required.'}, :status => 401) and return false
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment