Rails Model Annotation
January 30th, 2009
One of the things I like about datamapper over activerecord is that all the attributes of the model are listed in the model itself. I found something today that can help to bridge that gap in a small way.
Have a look at annotate-models you can install it as a gem
gem install annotate-models
annotate, you will then have something like this at the top of each model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# == Schema Information # Schema version: 20090130210328 # # Table name: profiles # # id :integer(4) not null, primary key # user_id :integer(4) # first_name :string(255) # last_name :string(255) # website :string(255) # blog :string(255) # flickr :string(255) # about_me :text # location :string(255) # is_active :boolean(1) # last_activity_at :datetime # created_at :datetime # updated_at :datetime # |



Leave a Reply