Fix comments in MR. Fixed event destroy with user

This commit is contained in:
Dmitriy Zaporozhets 2012-07-19 07:05:57 +03:00
parent 214fdd2d2f
commit 1464952597
9 changed files with 24 additions and 15 deletions

View file

@ -15,6 +15,11 @@ class User < ActiveRecord::Base
has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id
has_many :keys, :dependent => :destroy
has_many :events,
:class_name => "Event",
:foreign_key => :author_id,
:dependent => :destroy
has_many :recent_events,
:class_name => "Event",
:foreign_key => :author_id,