I have nested models:
Assessments has_many Questions has_many Answers.
I have plans on turning this into an engine where it can be used by
There are several fields in both Questions and Answers that, if
changed (or created ,deleted) I need to call a “update_procedure” that
does some calculations and saves the results in the Assessment.
Right now I have an after_save and after_destroy filter that calls the
routine if anything is changed, which is not what I want. What
approach do I need to handle filters if only certain attributes are
change?. The reason is that I may need to change the state/status of
the assessment if scores in another model were based on the current
version. I don’t need to do the state change if the admin just fixed a
I looked at Module: ActiveRecord::Dirty, but not sure I understand it.
Is that what I need to understand?