Displaying 1 result from an estimated 1 matches for "should_be_appended".
2006 Aug 03
3
How to override append method for related attribute?
I have a model that looks something like this:
class Person < ActiveRecord::Base
has_many :tasks
[...]
end
I''d like to override/overload the append (<<) method for the tasks
relational attribute such that I can perform some error checking in
the context of a Person.tasks << task operation. Is there any way to
do this?
I wish I could do this in the context of