dimanche 23 avril 2017

How to ensure attribute is updated only once in Rails 3 Active Record?

Wondering what could be the best way to handle situations where I need to update particular column and once updated it should not allow user to update again.

I tried using changed? method which checks for record that has been changed and not yet saved. But this would not check a particular attribute in that row.

Any suggestions?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire