Hello, I want to update a record in the table.here r the details. I have to modify a malinglist that contains email addresses to add another email in the list. But when i do @mailinglist.update_attributes(params[:mailinglist]) my old email addresses in the list are deleted and only new one remains how can i modify the list so that i can add instead of replacing the old email addresses. Thank you. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ank Ag wrote:> Hello, > I want to update a record in the table.here r the details. > > I have to modify a malinglist that contains email addresses to add > another email in the list. But when i do > @mailinglist.update_attributes(params[:mailinglist]) > my old email addresses in the list are deleted and only new one remains > > how can i modify the list so that i can add instead of replacing the old > email addresses. > Thank you.Maybe you can try: @mailinglist.new(params[:mailinglist]) @mailinglist.save -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---