ActiveRecord updating an attribute by adding a value

I have an attribute :notation in my model
and I would like to update it by adding an amount …
should I read first the existing value from the DB, add the amount to it
and save it back or
is it possible to do it in one update by defing a method in the model ?



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs