update_attributes fails: ReadOnlyRecord


you don't show what find_project() does but I'll guess that you've got a :joins option in your call to find(), in which case AR will set :readonly to true on your returned objects because they will have additional attributes that don't map to columns in your @project object's table.

Check the ActiveRecord::Base#find documentation for more information (and how you can pass :readonly => false to override).

Next, you are doing @project.update_attributes() on one line and then immediately below you are doing @project.save() - you do realize that update_attributes() writes to the database right? So you're saving to the database twice there.