I hereby claim:
- I am Bonias on github.
- I am piotrboniecki (https://keybase.io/piotrboniecki) on keybase.
- I have a public key whose fingerprint is 5B76 6179 2445 378E DD58 9FA5 C929 A71F 427F 7166
To claim this, I am signing this object:
{"responses": [{"id": "0","status":503,"headers" : {"Content-Type":"text/html; charset=us-ascii"},"body":<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"> | |
<HTML><HEAD><TITLE>Service Unavailable</TITLE> | |
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD> | |
<BODY><h2>Service Unavailable</h2> | |
<hr><p>HTTP Error 503. The service is unavailable.</p> | |
</BODY></HTML> | |
}]} |
I hereby claim:
To claim this, I am signing this object:
require 'net/http' | |
class UrlValidator < ActiveModel::EachValidator | |
def validate_each(record, attribute, value) | |
url = value | |
# Regex code by 'Arsenic' from http://snippets.dzone.com/posts/show/3654 | |
if url =~ /^ | |
( (https?):\/\/ )? |