Displaying 1 result from an estimated 1 matches for "acfe2f35".
Did you mean:
acfe2a95
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.
--