I recently came across this issue as well, and here's another way:
validates :activity_id, comparison: { equal_to: :activity_id_was }, on: :update
Alternatively, you can use activity_id_in_database
instead of activity_id_was
.
I recently came across this issue as well, and here's another way:
validates :activity_id, comparison: { equal_to: :activity_id_was }, on: :update
Alternatively, you can use activity_id_in_database
instead of activity_id_was
.