Skip to content

Instantly share code, notes, and snippets.

@Veejay
Created April 11, 2012 22:30
Show Gist options
  • Save Veejay/2363201 to your computer and use it in GitHub Desktop.
Save Veejay/2363201 to your computer and use it in GitHub Desktop.
respond_to :json
def index
if params[:secret].eql? SOME_API_TOKEN
respond_with Company.all_with_users_and_projects
else
render { head :forbidden } and return
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment