Skip to content

Instantly share code, notes, and snippets.

@scottwb
Created January 17, 2013 08:45
Show Gist options
  • Save scottwb/4554607 to your computer and use it in GitHub Desktop.
Save scottwb/4554607 to your computer and use it in GitHub Desktop.
# 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