Happy Monday Everyone, Would you kindly help out a struggling nuby in solving this problem? I have been researching all over, yet to find a workable solution.
Situation: A model [Announcement] that accepts nested attributes [Recipients] via many_to_many :through => :awards relationship. The Desired Outcome: #1. If a recipient's email in the announcement form is not found in the existing recipients' data, then a new recipient is created. #2. If a recipient's email is already in the database, then simply add award to their existing award profile without creating a new recipient.id My Struggle: The desired outcome #1 is satisfied w/ the current code. However when a recipient's email is already in the database, this error shown up "Recipient email already existed" - preventing saving into their award record. What should I do so that the desired outcome #2 can be met? See detailed code here: http://pastie.org/2062009 Many thanks in advance, Linda -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.