Created
January 17, 2013 08:45
-
-
Save scottwb/4554607 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
# Don't you feel like doing something like this when you use Ripple? | |
# Obviously there's more to it than this mockup, but man this would | |
# be nice, wouldn't it? | |
module Ripple | |
class Document | |
def self.method_missing(method, args) | |
if method.to_s =~ /^find_by_(.*)$/ | |
return find_by_index($1.to_sym, *args) | |
end | |
super | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment