Created
May 26, 2010 22:58
-
-
Save soveran/415193 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
class NilClass | |
def to_param | |
"all" | |
end | |
end | |
class Symbol | |
alias to_param to_s | |
end | |
class String | |
alias to_param dup | |
end | |
class Ohm::Model | |
alias to_param id | |
end | |
def url(*args) | |
"/" + args.map(&:to_param).join("/") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment