Sha256: 591532d6b1f8a83089feb88bbd9b24eba2d80240e05e53b190335e628aebb097

Contents?: true

Size: 315 Bytes

Versions: 5

Compression:

Stored size: 315 Bytes

Contents

class Api::V1::ClientsController < Api::V1::BaseController
  def index
    @clients = Client.order("name")
    unless admin?
      @clients = @clients.for_user(current_user)
    end
    @clients = @clients.where(:initials => params[:initials]) unless params[:initials].blank?
    render :json => @clients
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
xrono-1.0.4 app/controllers/api/v1/clients_controller.rb
xrono-1.0.3 app/controllers/api/v1/clients_controller.rb
xrono-1.0.2 app/controllers/api/v1/clients_controller.rb
xrono-1.0.1 app/controllers/api/v1/clients_controller.rb
xrono-1.0.0 app/controllers/api/v1/clients_controller.rb