0

Using rails acts_as_versioned, is there a way to skip a versioning event from happening, and just allowing a regular save?

AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012

2 Answers2

1

if i remember correcly

record.save_without_revision

should do the trick

roman
  • 11,143
  • 1
  • 31
  • 42
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