Class: ClientLogin::ClientsController
- Inherits:
-
BaseController
- Object
- BaseController
- ClientLogin::ClientsController
- Defined in:
- app/controllers/client_login/clients_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
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 client_login_client_path(@clients.first) if @clients.count == 1 end |
#show ⇒ Object
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 |