Added sortable headers + search + reportable Notes

This commit is contained in:
Shrey 2015-07-20 22:22:41 +05:30 committed by Matt Amos
parent 206e1309a9
commit 69c1f6d186
11 changed files with 177 additions and 48 deletions

View file

@ -1,6 +1,7 @@
class Issue < ActiveRecord::Base
belongs_to :reportable, :polymorphic => true
belongs_to :user, :class_name => "User", :foreign_key => :reported_user_id
belongs_to :user_updated, :class_name => "User", :foreign_key => :updated_by
has_many :reports, dependent: :destroy
has_many :comments, :class_name => "IssueComment", dependent: :destroy

View file

@ -27,6 +27,7 @@ class User < ActiveRecord::Base
has_many :roles, :class_name => "UserRole"
has_many :issues, :class_name => "Issue", :foreign_key => :reported_user_id
has_one :issue, :class_name => "Issue", :foreign_key => :updated_by
has_many :issue_comments
has_many :reports