From: Fred Phillips Date: 2008-07-29T06:56:13+09:00 Subject: Re: Camping not saving @state --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue Jul 29 06:43:14 2008, jonty wrote: > As far as I remember the saving is automatic, why_ always makes it easier= =20 > not harder > you shouldn't need to call save. Have you checked the database from=20 > sqlite's utility? > > > > Fred Phillips wrote: >> I have a sqlite3 database with the sessions table and schema set up >> correctly. Sessions are created fine and put in the table, the cookie >> is set with the correct hash and the hash is found again but when >> using @state the values aren=E2=80=99t updated in the table. >> >> I know that Session::service is called and the contents of the record >> are put into session like so: >> #> "iSCMSIzV7ITsRTr0UMA8Gko3LEnY3bw4", created_at: "2008-07-24 17:11:43",= =20 >> ivars: {}> >> >> I do @state.user =3D 5, then it then gets as far as making session look >> like this: >> #> "iSCMSIzV7ITsRTr0UMA8Gko3LEnY3bw4", created_at: "2008-07-24 17:11:43",= =20 >> ivars: {"TLCMS"=3D>{"user"=3D>5}}> >> >> But then session.save doesn=E2=80=99t write to the table, and doesn=E2= =80=99t throw an >> error (session.save! doesn=E2=80=99t either). Can anyone see what is goi= ng >> wrong? >> >> =20 > I=E2=80=99m not calling save, I just added prints in the camping source for debugging and I found that it does in fact call save, but isn=E2=80=99t sav= ed. Looking through sqlite3(1) the sessions are created, but their contents is not saved. --=20 Fred O. Phillips http://fophillips.org BBC7 7572 755F 83E0 3209 504A E4F7 874F 1545 9D41 --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkiOQDsACgkQ5PeHTxVFnUGuzACgotvznbwTmbIu7a2kERXB+Ll1 WYwAn2yDlITiW5QoRGsIBYjpvPgrTsaE =wJOU -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--