Created
August 6, 2009 08:08
-
-
Save RSpace/163187 to your computer and use it in GitHub Desktop.
This file contains 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
module SiteExtension | |
def self.included(base) | |
base.class_eval { | |
extend ClassMethods | |
} | |
end | |
module ClassMethods | |
# We only have one site, and we want to use that whatever the url might be | |
def find_by_host(host) | |
Site.first | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment