Class: CustomersController
- Inherits:
-
PeopleController
- Object
- InheritedResources::Base
- AuthorizedController
- PeopleController
- CustomersController
- Defined in:
- app/controllers/customers_controller.rb
Instance Method Summary collapse
Methods inherited from AuthorizedController
Instance Method Details
#show ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/controllers/customers_controller.rb', line 4 def show # Invoice scoping by state by_state = params[:by_state] || 'all' @open_debit_invoices = resource.invoices.reorder('due_date DESC').by_state('booked') @paid_debit_invoices = resource.invoices.reorder('due_date DESC').by_state(['canceled', 'paid']) show! end |