From 6f661d40b39dbd38104507d364539b13ea354f85 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 21 Jan 2015 08:27:46 +0000 Subject: [PATCH] Set :inverse_of option on journals association. git-svn-id: http://svn.redmine.org/redmine/trunk@13923 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', -- 2.39.5