generally, when we use update_attributes, it will save automatically. however, what if we just want to new an record and update some attributes of it. what can we do?
We can use assign_attributes method.
1 2 3 4 |
|
generally, when we use update_attributes, it will save automatically. however, what if we just want to new an record and update some attributes of it. what can we do?
We can use assign_attributes method.
1 2 3 4 |
|