Added support for reporting Changesets + Deleting issues from the CLI
This commit is contained in:
parent
cf639202b8
commit
b68b29b43c
9 changed files with 51 additions and 16 deletions
|
@ -2,8 +2,8 @@ class Issue < ActiveRecord::Base
|
|||
belongs_to :reportable, :polymorphic => true
|
||||
belongs_to :user, :class_name => "User", :foreign_key => :reported_user_id
|
||||
|
||||
has_many :reports
|
||||
has_many :comments, :class_name => "IssueComment"
|
||||
has_many :reports, dependent: :destroy
|
||||
has_many :comments, :class_name => "IssueComment", dependent: :destroy
|
||||
|
||||
validates :reportable_id, :uniqueness => { :scope => [ :reportable_type ] }
|
||||
validates :reported_user_id, :presence => true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue