Class: Renalware::HD::MDMPatientsForm
- Inherits:
-
Object
- Object
- Renalware::HD::MDMPatientsForm
- Includes:
- ActiveModel::Model, Virtus::Model
- Defined in:
- app/models/renalware/hd/mdm_patients_form.rb
Overview
Form object to help us map chosen input values in the HD MDM patient list filters form into ransack predicates. Used in this instance because mapping the form’s schedule_definition_ids dropdown value in the format of e.g “[1, 3, 6]” into the integer arry [1, 3, 6] is not something Ransack can do - hence this intermediate form object to do the mapping.
Instance Method Summary collapse
-
#ransacked_parameters ⇒ Object
The hash returned here is passed into the Ransack #search method later i the ouery object.
Instance Method Details
#ransacked_parameters ⇒ Object
The hash returned here is passed into the Ransack #search method later i the ouery object.
18 19 20 21 22 23 |
# File 'app/models/renalware/hd/mdm_patients_form.rb', line 18 def ransacked_parameters { hd_profile_hospital_unit_id_eq: hospital_unit_id, hd_profile_schedule_definition_id_in: schedule_definition_ids_array } end |