In my project I have a Forum that has many Topics, and each Topic has many Posts. When I add a Post to a Topic, I would like to update a timestamp column in the Topic model to record when the last Post was added to the Topic. How can I do this?
Thank you for looking!
you can use the after_save callback in the model
=> http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html