Created
July 17, 2011 05:31
-
-
Save rhysforyou/1087227 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def uri= uri | |
| needs_root_domain = ((%r{^http://[^/]+/} =~ uri) == nil) | |
| if needs_root_domain | |
| @uri = "http://www.metafilter.com#{uri}" | |
| else | |
| @uri = uri | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment