Class: Renalware::HD::HistoricalProfilesController

Inherits:
BaseController show all
Includes:
PresenterHelper
Defined in:
app/controllers/renalware/hd/historical_profiles_controller.rb

Instance Method Summary collapse

Methods included from PresenterHelper

#present

Methods inherited from BaseController

#patient

Instance Method Details

#indexObject



20
21
22
23
24
25
26
27
# File 'app/controllers/renalware/hd/historical_profiles_controller.rb', line 20

def index
  profiles = Profile.deleted.ordered.for_patient(patient)
  authorize profiles
  render locals: {
    patient: patient,
    profiles: present(profiles, ProfilePresenter)
  }
end

#showObject



11
12
13
14
15
16
17
18
# File 'app/controllers/renalware/hd/historical_profiles_controller.rb', line 11

def show
  profile = Profile.deleted.for_patient(patient).find(params[:id])
  authorize profile
  render locals: {
    patient: patient,
    profile: ProfilePresenter.new(profile)
  }
end