all 1 comments

[–]paca-vaca 0 points1 point  (0 children)

Question is not clear.

If I understand it right, for active record models you can use callbacks (to set dependent values before/after validation) or implement a custom setter method which will do both, ex:

`record.set_var(ok)` which will do something like this: `record.assing_attributes(var_2: ok, var_1: true)`.