Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def method_missing(meth, *params, &block)
- if /^find_by_(?<prop>.*)/ =~ meth
- find_by(prop, *params, &block)
- else
- super
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement