Skip to content

Instantly share code, notes, and snippets.

@minams
minams / rails http status codes
Created April 9, 2019 17:11 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
phone_numbers = [
"(206) 555-1234",
"425-555-9999",
"406.555.1818",
"+1 206 555 8888",
"4255558872",
]
pattern = /^.*(\d{3}).*(\d{3}).*(\d{4})$/