-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Carl Youngblood wrote:> I noticed that scaffolding on an sqlite database (unsurprisingly)
can''t
> tell when you want a string field to hold a datetime, for example. Is
> there a way that I can give rails extra hints about what a database
> field is supposed to hold?
Use type declarations when you create your SQLite table:
create table items (
id integer primary key,
name varchar(255),
updated_at datetime
);
rather than
create table items (id integer primary key, name, updated_at);
jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB9cn3AQHALep9HFYRApvUAJ9qTuzE9UzohFcmTRGt5P1NFrIY4ACgy0Aa
TKmIlzUmHXdWb++3SPUZF8E=3vzK
-----END PGP SIGNATURE-----