I have the snippet below in one of my AR models:
after_update :cache_bust
The cache_bust method in the model accepts a parameter (
cache_bust
Very easy to pass params from controller to callback, you can call name of params in model. Example:
In controller:
Quiz.create(name: 'abc')
In model:
before_create :valid_name? def valid_name? puts name end