controllers: standardize request format checks.

This commit is contained in:
evazion
2020-02-14 17:28:25 -06:00
parent c0cca18091
commit 1e426a50f7
3 changed files with 5 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ class PostsController < ApplicationController
def show
@post = Post.find(params[:id])
if request.format == Mime::Type.lookup("text/html")
if request.format.html?
@comments = @post.comments
@comments = @comments.includes(:creator)
@comments = @comments.includes(:votes) if CurrentUser.is_member?