For soem reason I have a field that's changing upon assigning it as a
property value. I have no clue why.
*DL.create_table? :pwtest do primary_key :id String :uname, size: 16
String :pw, size: 64 DateTime :cdate, default:
Sequel::CURRENT_TIMESTAMPend*
*class PWtest < Sequel::Model(DL[:pwtest]) def save_new() pwpresave =
BCrypt::Password.create(self.pw) puts '### save_new' puts
pwpresave.version, pwpresave.cost puts pwpresave == "#{ self.pw }"
puts '/save_new' DL[:pwtest].insert(uname: self.uname, pw: pwpresave)
endend*
Performance script:
*DL[:pwtest].deletehold = []puts '### Records generation'1.times do a =
PWtest.new a.uname = RFFaker.username pwtemp = Gen.pw(24) a.pw = pwtemp
Dev.feedback("pwtemp", pwtemp) if true Dev.feedback("a.pw", a.pw) if true
Dev.feedback("Digest MD5", Digest::MD5.hexdigest(pwtemp)) if true
Dev.feedback("a.pw == pwtemp", a.pw == pwtemp) if true a.save_new ap aend*
Here is the output:
*### Records generation /users/rich/app.rb (286) pwtemp:
cMkxfdnvjyhowqiEKpaPermg /users/rich/app.rb (287) a.pw: hWvfMpey
/users/rich/app.rb (288) Digest MD5: c4bac7b0d1014c353b8e8405c7fb7021
/users/rich/app.rb (289) a.pw == pwtemp: falsesave_new2a12false/save_new*
*{ :uname => "deandre738", :pw => "cMkxfdnvjyhowqiEKpaPermg"}*
__pwtemp__ shows proper. __a.pw__ was assigned __pwtemp__ but or some
reason comes up short. I can only guess that `PostgreSQL` is doing this,
as my code is not. But that fieldname of `pw` shouldn't introduce any
automatic encryption, nor is that turned on anyway. So I'm confused as to
why this is happening.
I know the answer is right in front of my face. What am I doing wrong?
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/ca5a104a-c4e6-44f9-9a80-c44f427c64fdn%40googlegroups.com.