Oh, and since this action only responds with json, just having ' render json: { is_deputy: @is_deputy, users: @users.to_json(only: :id, methods: :name } ' without the respond_to block might be sufficient.