Active Record Extension – Ryan’s Scraps
Read a useful posting on Ryan’s scraps about how to extend ActiveRecord. class Organization < ActiveRecord::Base This simply adds the ability to find_active
organization.people.find_active
has_many :people do
def find_active
find(:all, :conditions => ["active = ?", true])
end
end
end
