search for: find_all_by_living_in

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

2006 Jan 02
3
Altering the accessor of an association collection
I want to be able to do something like this (for example): class Person < ActiveRecord::Base has_many :friends def friends(living_in = :uk) # filter based on parameters here end end Is there any way I can redefine the accessor for an association whilst still being able to get the values? Basically, I''m looking for an equivilent of read_attribute() for associations. --