laserlemon / vestal_versions

Keep a DRY history of your ActiveRecord models' changes
MIT License
933 stars 229 forks source link

Using Versioned on a colum #96

Open nikinjain1 opened 11 years ago

nikinjain1 commented 11 years ago

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.

nozpheratu commented 11 years ago

@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.