Both model A and model B have a one-to-many relationship. Seems to me that you have not done your homework.
There is a huge abundance of information on the web to understand Ruby and Ruby on Rails. Research: Rails models associations Liz On Monday, August 24, 2015 at 6:00:14 AM UTC-4, Ruby-Forum.com User wrote: > > Hi, > > Is there any way that I can Update column value of another table when > saving form data of another model. > > For example: > > I have two models model A and model B. Both of them have one to many > relation with each other. > > On filling data in form fields of model B , when particular condition > met, i want to update the column value of model A. > > -- > 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f96af1e2-5211-4e80-98ea-2c18562d1b09%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.