I have a Ratings model where a user can rate an object... After a rating takes place I want to then automatically create a RatingLog record so the user can see a list of all the ratings.
Models: Rating.rb and RatingLog.rb
I see RatingLog including a list of events other than just Ratings, like Badges etc... VERY similar to StackOverflow.
What is the right way with Rails 5, to populate RatingLog.rb after a Rating is created... Should I use after_create
in Rating.rb? Should I create some other type of callback? Would love to hear what is the right way to implement the above in Rails 5.
Thank you