News for hackers. Stuff that matters.
Re:Reversible Migrations in Rails 3.1 by snprbob86 on Saturday May 07, 2011 @05:10PM (#2524569)
> i don't have to look at the database to know which properties a model has

I just pop open db/schema.rb and then search for where the users table schema is described. This .rb file is automatically generated. In production systems, I actually configure it to use db/schema.sql which stores the SQL schema instead of the Ruby schema, since my production database has indexes that Rail's migrations can't describe directly.

Or even more directly:

  psql -c '\d users'
Which I typically run from vim:

  :!psql -c '\d users'
And that just prints out the description of the table for me.
Re:Reversible Migrations in Rails 3.1 by fernandotakai on Saturday May 07, 2011 @08:05PM (#2524913)
I don't know, but i think that looking at models/yourmodel.py is easier. But well, this is me (and also, i came from a hibernate/spring background).

And for 'newbies', it's more intuitive to look for a class model than to look for sql schema.