Hi all !
Is this supposed to work ?
class Email < ActiveRecord::Base has_many :to, :class_name => 'Recipient', :conditions => "recipients.source = 'to'" do def create!(*args) with_scope(:create => {:source => 'to'}) do super end end
def build(*args) with_scope(:create => {:source => 'to'}) do super end end end end
correctly has it's source attribute set to 'to'. On the other hand, if I call #build, the recipient's source is nil.
There must be something I'm doing wrong...
Thanks !