I have the following model:
class Movie < ActiveRecord::Base #Has rating, duration, year as database fields #Want to store content_rating in redis instead of databaseend
I update the model like this:
movie = Movie.find(1) movie.update(rating: 5, duration: 3600, year: "1955", content_rating: "PG-13")
Want I want is that all the db attributes(rating, duration, year) are stored in the database, and content_rating is stored in redis.
Is this possible with rails without saving content_rating manually in the after_update callback?