Method: Rush::FindBy#method_missing
- Defined in:
- lib/rush/find_by.rb
#method_missing(meth, *args) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/rush/find_by.rb', line 10 def method_missing(meth, *args) if m = meth.to_s.match(/^find_by_([a-z_]+)$/) find_by(m[1], args.first) elsif m = meth.to_s.match(/^find_all_by_([a-z_]+)$/) find_all_by(m[1], args.first) else super end end |