From d303b5b18e58da700ec88cf257a03d9b0898c24c Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Fri, 19 Jan 2024 21:14:32 +0100 Subject: [PATCH] Use `attr_accessor` for `Answer` object properties --- app/models/answer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/answer.rb b/app/models/answer.rb index 07a261e1..f13880f9 100644 --- a/app/models/answer.rb +++ b/app/models/answer.rb @@ -1,7 +1,7 @@ class Answer < ApplicationRecord extend Answer::TimelineMethods - attr_writer :has_reacted, :is_subscribed + attr_accessor :has_reacted, :is_subscribed belongs_to :user, counter_cache: :answered_count belongs_to :question, counter_cache: :answer_count