Class: PeopleController

Inherits:
AuthorizedController show all
Defined in:
app/controllers/people_controller.rb

Instance Method Summary collapse

Methods inherited from AuthorizedController

#set_locale

Instance Method Details

#showObject



2
3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/people_controller.rb', line 2

def show
  @credit_invoices = resource.credit_invoices
  @debit_invoices = resource.debit_invoices

  # Invoice scoping by state
  by_state = params[:by_state] || 'all'
  @credit_invoices = @credit_invoices.reorder('due_date DESC').by_state(by_state)
  @debit_invoices = @debit_invoices.reorder('due_date DESC').by_state(by_state)

  show!
end