Help me figure out the difference between this line:

current_user.money = 20 

and this:

 current_user.update(money: 20) 

    1 answer 1

    One fully incorporates the effect of the other.

     current_user.update(money: 20) 

    ... similarly:

     current_user.money = 20 current_user.save