Fix "Cannot infer root key from collection type." in UserController

This commit is contained in:
Patrick Gansterer 2019-01-16 20:54:12 +01:00
parent 1773018191
commit d4ab0a055f

View file

@ -4,7 +4,7 @@ class UsersController < ApplicationController
def index
@users = User.undeleted.natural_search(params[:q])
respond_to do |format|
format.json { render :json => @users.map(&:token_attributes) }
format.json { render :json => @users.map(&:token_attributes).to_json }
end
end