Is there a way to use validation however you can pass a function (or a string) to validate on and not the actual value stored in the db?
On May 25, 3:46 pm, "tashfeen.ekram" <[email protected]> wrote: > hmmm.... ok. i was using strongbox gem. what you recommends seems like > it would work if i wrote my ownencryption. i think theencryptionin > the gem is carried out prior to validation. is there another way in > which i can still use strongbox? > > On May 25, 2:59 pm, Robert Walker <[email protected]> wrote: > > > tashfeen.ekram wrote: > > > I am encrypting data mainly email addresses. I would like to use the > > > validations built into rails however I am not sure how to do that > > > given that the actual data stored in the database is an encrypted > > > version. i would like to run the validation on the decrypted version > > > of the data. > > > Okay, so perform yourencryptionafter validation not before. > > >http://railsapi.com/doc/rails-v2.3.5/classes/ActiveRecord/Callbacks.h... > > -- > > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

