From: Jean-Philippe Lang Date: Wed, 21 Jan 2015 08:27:46 +0000 (+0000) Subject: Set :inverse_of option on journals association. X-Git-Tag: 3.0.0~99 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6f661d40b39dbd38104507d364539b13ea354f85;p=redmine.git Set :inverse_of option on journals association. git-svn-id: http://svn.redmine.org/redmine/trunk@13923 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/issue.rb b/app/models/issue.rb index 3815921d9..aca31291d 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -31,7 +31,7 @@ class Issue < ActiveRecord::Base belongs_to :priority, :class_name => 'IssuePriority' belongs_to :category, :class_name => 'IssueCategory' - has_many :journals, :as => :journalized, :dependent => :destroy + has_many :journals, :as => :journalized, :dependent => :destroy, :inverse_of => :journalized has_many :visible_journals, lambda {where(["(#{Journal.table_name}.private_notes = ? OR (#{Project.allowed_to_condition(User.current, :view_private_notes)}))", false])}, :class_name => 'Journal',