When pagenation is applied on the message#show (i.e. there are more than 25 replies), wrong heart buttons may be shown. In addition, N+1 issue exists here (like #4).
On _view_layouts_base_content.html.erb, the reply objects should be obtained by @replies but actually obtained by @heartable.children.
When pagenation is applied on the message#show (i.e. there are more than 25 replies), wrong heart buttons may be shown. In addition, N+1 issue exists here (like #4).
On _view_layouts_base_content.html.erb, the reply objects should be obtained by
@replies
but actually obtained by@heartable.children
.