before_save :balance_status, :on => :update
it is throwing "Unknown key: :on. Valid keys are: :if, :unless, :prepend" in Rails-6
before_save :balance_status, :on => :update
it is throwing "Unknown key: :on. Valid keys are: :if, :unless, :prepend" in Rails-6
before_save is used for both create and update. You should use before_update :balance_status instead.
In rails 6 the option on does not exists for before_save, see the official documentation for more info. You can use before_commit.