ruby on rails - Send back data from activerecord model on create -
i wondering if there way can send data model on create. in app have model that on create generates keys , hashes them in database. unhashed form of key , send user , allow them view once , have them save elsewhere. tried setting flash message inside model isn't working.
you can add non-persisted fields models using attr_accessor
regular ruby class. activerecord won't pick on these. can add field , put there, , present life of object (or until cleared). don't reload
.
Comments
Post a Comment