vestal_versions icon indicating copy to clipboard operation
vestal_versions copied to clipboard

Using Versioned on a colum

Open nikinjain1 opened this issue 11 years ago • 1 comments

I need to use Versioned on a column in my model.

Say I have member model with name, address and password fields

If I need to use Versioned opition only on password fields, then what is the syntax I need to follow to implement that.

nikinjain1 avatar Jun 06 '13 08:06 nikinjain1

@nikinjain1 You can use the condition symbol when you call versioned in your model, something like:

versioned :if => :password_changed?

Should do what you need.

nozpheratu avatar Jun 13 '13 22:06 nozpheratu