The Model Dependency diagram reflects links between the models, specified in the source code.
- Open for editing the desired model classes. You can do that by choosing a model class in the Rails view, or in the Model Dependency diagram, and pressing F4F4F4F4F4F4F4F12 or Ctrl+Shift+EF4Command Down or F4F4F3F4.
- In the editor, add relationship statements to the respective classes. For example:
class Owner < ActiveRecord::Base attr_accessible :first_name, :last_name, :pet_name has_many :pets end ... class Pet < ActiveRecord::Base attr_accessible :age, :nickname, :species, :owner belongs_to :owner end
- Switch to the Model Dependency diagram, and see the relationship links between the models, with