TheExit
TheExit

Reputation: 5320

Rails - Acts_as_versioned ------ save_without_revision

I'm using acts_as_versioned for images. Though it's possible in my app to update just the title, which shouldn't be a version as version are for image replacements.

Problem is, if you update just the title, acts_as_versioned creates a new version which breaks everything. So when calling the model def update_title for photos, I want to try what I found in the DOC:

save_without_revision: http://ar-versioned.rubyforge.org/classes/ActiveRecord/Acts/Versioned/ActMethods.html#M000008

But I don't know how to do that? Where do I include this? Somewhere, somehow in the controller?

Thanks

Upvotes: 1

Views: 630

Answers (1)

mark
mark

Reputation: 10564

You would use it like regular active record, in your controller. eg:

@article.save_without_revision

I recommend you use vestal_versions anyhow.

Upvotes: 2

Related Questions