Go back to the main page

Rails mass assignment without persisting

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul

 

user = User.find(1)
user.attributes = { timesheet_attributes: { start: "Tuesday" } }

Comment on this article?