summaryrefslogtreecommitdiffstats
path: root/app/models/journal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/journal.rb')
-rw-r--r--app/models/journal.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb
index 18a6ec083..f70a69863 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -17,6 +17,10 @@
class Journal < ActiveRecord::Base
belongs_to :journalized, :polymorphic => true
+ # added as a quick fix to allow eager loading of the polymorphic association
+ # since always associated to an issue, for now
+ belongs_to :issue, :foreign_key => :journalized_id
+
belongs_to :user
has_many :details, :class_name => "JournalDetail", :dependent => :delete_all
end