Use `attr_accessor` for `Answer` object properties
This commit is contained in:
parent
1db358e7a1
commit
d303b5b18e
|
@ -1,7 +1,7 @@
|
||||||
class Answer < ApplicationRecord
|
class Answer < ApplicationRecord
|
||||||
extend Answer::TimelineMethods
|
extend Answer::TimelineMethods
|
||||||
|
|
||||||
attr_writer :has_reacted, :is_subscribed
|
attr_accessor :has_reacted, :is_subscribed
|
||||||
|
|
||||||
belongs_to :user, counter_cache: :answered_count
|
belongs_to :user, counter_cache: :answered_count
|
||||||
belongs_to :question, counter_cache: :answer_count
|
belongs_to :question, counter_cache: :answer_count
|
||||||
|
|
Loading…
Reference in New Issue