mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 10:09:53 +01:00
Re-add accessors for singular answer cases
Otherwise rendering fails
This commit is contained in:
parent
25cbb962dd
commit
b160fa21f6
1 changed files with 2 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
class Answer < ApplicationRecord
|
class Answer < ApplicationRecord
|
||||||
extend Answer::TimelineMethods
|
extend Answer::TimelineMethods
|
||||||
|
|
||||||
|
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
|
||||||
has_many :comments, dependent: :destroy
|
has_many :comments, dependent: :destroy
|
||||||
|
|
Loading…
Reference in a new issue