Class: Renalware::Transplants::LiveDonorsController

Inherits:
BaseController show all
Includes:
Concerns::Pageable
Defined in:
app/controllers/renalware/transplants/live_donors_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Methods inherited from BaseController

#patient

Instance Method Details

#indexObject



10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/renalware/transplants/live_donors_controller.rb', line 10

def index
  query = LiveDonorsQuery.new(params[:q])
  live_donors = query.call.page(page).per(per_page || 50)

  authorize live_donors
  render locals: {
    live_donors: live_donors,
    q: query.search
  }
end