vestal_versions icon indicating copy to clipboard operation
vestal_versions copied to clipboard

Can't mass-assign these protected attributes: updated_by

Open prosm opened this issue 15 years ago • 1 comments

Hello,

I have installed vestal_versions and followed the instructions, the versioning works fine, however when i try to use updated_by such as:

@post.update_attributes(params[:post].merge(:updated_by => User.first))

i get the error/warning "Can't mass-assign these protected attributes: updated_by"

doing a @post.versions.last.user comes back nil as well.

is this a bug or iam missing something?

prosm avatar Jul 05 '10 17:07 prosm

I haven't protected the updated_by attribute anywhere in VV (that I'm aware of), so I'd check your versioned model for any instance of the attr_accessible class method. If that exists, add updated_by to the arguments and that should fix you up.

laserlemon avatar Sep 21 '10 15:09 laserlemon