Added sortable headers + search + reportable Notes
This commit is contained in:
parent
206e1309a9
commit
69c1f6d186
11 changed files with 177 additions and 48 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue