search for: find_all_by_paid

Displaying 1 result from an estimated 1 matches for "find_all_by_paid".

Did you mean: find_all_by_id
2007 Mar 09
0
New plugin: Flagger
Hi all, I''ve just put out a plugin for ActiveRecord that stops you having to write repetitive bundles of methods such as class Order < ActiveRecord::Base def self.paid find_all_by_paid(true) end def self.unpaid find_all_by_paid(false) end def mark_as_paid update_attribute(:paid, true) # related tasks end def mark_as_unpaid update_attribute(:paid, false) # related tasks end end It gives you dynamic attribute-based met...