Skip to content

Instantly share code, notes, and snippets.

@bholzer
Created January 4, 2018 04:47
Show Gist options
  • Select an option

  • Save bholzer/a2100639c7fc5de70a318e4de4e8761b to your computer and use it in GitHub Desktop.

Select an option

Save bholzer/a2100639c7fc5de70a318e4de4e8761b to your computer and use it in GitHub Desktop.
def response_for_auth_fail(auth_error: :invalid)
messages = {
invalid: "Some error",
inactive: "Some error"
locked: "Some error"
}
{ auth_error: auth_error, message: messages[:auth_error] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment