Executing ActiveRecord queries directly in the view is considered very bad practice. Since you already have the association methods for these, we could use them instead:

`@users.find(article.user_id).email` can be `article.user.email`
`@comments.where(article_id: article.id).count` can be `article.comments.count`

You can then avoid assigning these extra unneeded instance variables in your controller.