Created
April 11, 2012 22:30
-
-
Save Veejay/2363201 to your computer and use it in GitHub Desktop.
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
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