ruby-on-railsacts-as-versioned

Acts_as_Version is there a way to skip a versioning from occurring on save?


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


Solution

  • 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