|
|
|
@ -17,10 +17,10 @@
|
|
|
|
|
|
|
|
|
|
class Journal < ActiveRecord::Base
|
|
|
|
|
include UserScoreHelper
|
|
|
|
|
belongs_to :journalized, :polymorphic => true
|
|
|
|
|
belongs_to :journalized, :polymorphic => true,:touch => 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 :issue, :foreign_key => :journalized_id,:touch => true
|
|
|
|
|
|
|
|
|
|
belongs_to :user
|
|
|
|
|
has_many :details, :class_name => "JournalDetail", :dependent => :delete_all
|
|
|
|
|