Skip to content

Commit

Permalink
project-has-many-members
Browse files Browse the repository at this point in the history
Let's do the other ends of those two belongs-to associations. In the Project model:

SHOW_PATCH
  • Loading branch information
bryanlarsen committed Feb 19, 2010
1 parent 0f2a95e commit 91a5cf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/project.rb
Expand Up @@ -8,6 +8,8 @@ class Project < ActiveRecord::Base
end

has_many :stories, :dependent => :destroy
has_many :memberships, :class_name => "ProjectMembership", :dependent => :destroy
has_many :members, :through => :memberships, :source => :user

belongs_to :owner, :class_name => "User", :creator => true

Expand Down

0 comments on commit 91a5cf3

Please sign in to comment.