app/controllers/comable/admin/users_controller.rb in comable-backend-0.7.0.beta2 vs app/controllers/comable/admin/users_controller.rb in comable-backend-0.7.0
- old
+ new
@@ -8,9 +8,14 @@
load_and_authorize_resource class: Comable::User.name, except: :index
def index
@q = Comable::User.ransack(params[:q])
@users = @q.result.page(params[:page]).accessible_by(current_ability).by_newest
+
+ respond_to do |format|
+ format.html
+ format.json { render json: @users }
+ end
end
def show
end