Skip to content

Instantly share code, notes, and snippets.

@Visgean
Created November 19, 2013 23:05
Show Gist options
  • Select an option

  • Save Visgean/7554197 to your computer and use it in GitHub Desktop.

Select an option

Save Visgean/7554197 to your computer and use it in GitHub Desktop.
def authenticate
if request.post?
if params[:password] == 'sbk6JQ5wKCHr'
session[:authenticated] = true
respond_to do |format|
format.json { head :ok }
end
else
respond_to do |format|
format.json { head :no_content }
end
end
else
render "login"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment