diff --git a/app/controllers/api/application_controller.rb b/app/controllers/api/application_controller.rb index 0bea5bc..eeb7509 100644 --- a/app/controllers/api/application_controller.rb +++ b/app/controllers/api/application_controller.rb @@ -37,9 +37,8 @@ module API end def json_filter! - if request.format != :json - head :not_acceptable, content_type: 'application/json' - end + return if request.format.json? + head :not_acceptable, content_type: 'application/json' end end end