Group entity. Group has many projects

This commit is contained in:
Dmitriy Zaporozhets 2012-10-02 18:17:12 +03:00
parent 2e1c3c52bc
commit fa3ae24ca7
8 changed files with 116 additions and 1 deletions

View file

@ -11,6 +11,7 @@ class Project < ActiveRecord::Base
attr_accessor :error_code
# Relations
belongs_to :group
belongs_to :owner, class_name: "User"
has_many :users, through: :users_projects
has_many :events, dependent: :destroy
@ -173,4 +174,6 @@ end
# wall_enabled :boolean default(TRUE), not null
# merge_requests_enabled :boolean default(TRUE), not null
# wiki_enabled :boolean default(TRUE), not null
# group_id :integer
#