vestal_versions
vestal_versions copied to clipboard
Can't mass-assign these protected attributes: updated_by
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?
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.