How to Submit Polymorphic Comments on Feed? [Error]

前端 未结 2 1790
你的背包
你的背包 2020-12-21 12:51

If a user clicks the [+ Comment] button

\"enter

he is confron

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-21 13:27

    In the load_commentable before action, you could redirect to an error page or something if @commentable is nil. As it is, you are trying to access attributes of this nil object in other methods (create in the case of this error).

提交回复
热议问题