class HostsController < ActionController::Base
  def index
    @hosts = Host.all

    render json: HostsPresenter.new(@hosts).as_hash.to_json
  end
end

class HostsController < ActionController::Base
  def index
    @hosts = Host.all.order(:hostname)

    render json: HostsPresenter.new(@hosts).as_hash.to_json
  end
end

Order the hosts API output based on the hostname, A-Z
Order the hosts API output based on the hostname, A-Z
