Look at http://api.rubyonrails.org/classes/ActiveModel/Dirty.html, specifically method changed? at http://api.rubyonrails.org/classes/ActiveModel/Dirty.html, and http://apidock.com/rails/ActiveRecord/Dirty/changed
On Friday, August 21, 2015 at 6:47:15 AM UTC-4, Ruby-Forum.com User wrote: > > Hi, > > Is there any way to insert data when form is saved into another table. > > Say for example: > > I have membership table which already contains some data and have column > names as 'no_of_users_added', 'no_of_users_left'. > > I want to insert data from user table based on the count value how many > users are saved and the corresponding column values ('no_of_users_added' > and 'no_of_users_left') gets updated into the Membership table. > > Please help me resolving this issue. > > Regards, > Milley > > -- > 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/f9a7eb00-7397-4ac1-b8df-e121448117c4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.