Generating association while generating model

Published on

May be you guys are already aware of, but in Rails 2.2 we can specify belongs_to association while generating model. So if we issue: We will get a Post model like: class Post < ActiveRecord::Base belongs_to :author end [/ruby] Also it will automatically add the foreign key column in the migration. [ruby] class CreatePosts < … Continue reading Generating association while generating model