I have a Project model that accepts nested attributes for tasks. And the task has a virtual attribute "name". Therefore, every time I change the name, it is saved as encrypted_task_name before updating. On the project editing page, the form has an input field for the name of the task (and not encrypted_task_name). When I change the name and since the name is a virtual attribute, Rails does not detect a change in the Task and does not update this task when updating Project.
How can I guarantee that the task will be saved even if its virtual attributes are changed during the update of Project?
One option that I don't want to use is: autosave => true on task.rb, since I rarely update.
source share