Class: ClientLogin::ClientsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/client_login/clients_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



17
18
19
20
# File 'app/controllers/client_login/clients_controller.rb', line 17

def index
  @clients = Client.order('name').for_user(current_user)
  redirect_to (@clients.first) if @clients.count == 1
end

#showObject



22
23
24
25
# File 'app/controllers/client_login/clients_controller.rb', line 22

def show
  bucket = Project.sort_by_name.for_client(@client).for_user(current_user)
  @projects = bucket.all
end