Using rails acts_as_versioned, is there a way to skip a versioning event from happening, and just allowing a regular save?
Asked
Active
Viewed 289 times
2 Answers
1
It looks like you could do either of these:
@post = Post.find(params[:id])
# assign some stuff to your post
@post.save_without_revision
or
@post = Post.find(params[:id])
@post.without_revision do
@post.update_attributes(params[:post])
end

Dylan Markow
- 123,080
- 26
- 284
- 201
-
Thanks but that doesn't seem to work. I think it might be because I'm using paperclip for image attachments. And paperclip is doing it's own saving method that isn't even looking at something like "acts_as_versioned :if => Proc.new { |attachment| .... – AnApprentice Jan 30 '11 at 19:41