Fix crash on commentable check
This commit is contained in:
@@ -25,7 +25,7 @@ class Comment < ApplicationRecord
|
||||
|
||||
private
|
||||
def card_is_commentable
|
||||
errors.add(:card, "does not allow comments") unless card.commentable?
|
||||
errors.add(:card, "does not allow comments") unless card&.commentable?
|
||||
end
|
||||
|
||||
def watch_card_by_creator
|
||||
|
||||
Reference in New Issue
Block a user