Return User objects instead of hashes

This commit is contained in:
Mike Moore
2013-02-07 05:54:55 -05:00
parent 1cd565ec0d
commit 5b01ac9288
2 changed files with 11 additions and 9 deletions

View File

@ -294,7 +294,8 @@ class UsersController < ApplicationController
results = UserSearch.search term, topic_id
render :json => results
render json: { users: results.as_json( only: [ :username, :name ],
methods: :avatar_template ) }
end
private