1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 01:11:12 +00:00

Set :inverse_of option on journals association.

git-svn-id: http://svn.redmine.org/redmine/trunk@13923 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2015-01-21 08:27:46 +00:00
parent 4730ef894f
commit 6f661d40b3

View File

@ -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',