From 2d65eb3ebfebc48592fb80ea47663de9b52695b8 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Mon, 12 Feb 2018 07:44:48 +0100 Subject: [PATCH] use string for class_name --- app/models/journal.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/journal.rb b/app/models/journal.rb index d3112de416..005d773a11 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -44,8 +44,8 @@ class Journal < ActiveRecord::Base belongs_to :user belongs_to :journable, polymorphic: true - has_many :attachable_journals, class_name: Journal::AttachableJournal, dependent: :destroy - has_many :customizable_journals, class_name: Journal::CustomizableJournal, dependent: :destroy + has_many :attachable_journals, class_name: 'Journal::AttachableJournal', dependent: :destroy + has_many :customizable_journals, class_name: 'Journal::CustomizableJournal', dependent: :destroy after_create :save_data, if: :data after_save :save_data, :touch_journable