Class: Api::V1::ClientsController
- Inherits:
-
BaseController
- Object
- BaseController
- Api::V1::ClientsController
- Defined in:
- app/controllers/api/v1/clients_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'app/controllers/api/v1/clients_controller.rb', line 2 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 |