Annotated models
Posted by Marcel Molina Jr. 3 hours ago
Ever working with a model and you forget what all of its columns
are? Ever find yourself with your schema.rb open in a
separate window so you can see what the structure is of your
tables?
# Schema as of Sun Feb 26 21:58:32 CST 2006 (schema version 7)
#
# id :integer(11) not null
# quantity :integer(11)
# product_id :integer(11)
# unit_price :float
# order_id :integer(11)
#
class LineItem < ActiveRecord::Base
belongs_to :product
When the schema is updated, the comment is updated to reflect the new schema.


Loading...