Sha256: cf08439dac9ae09b55a0610409b33bc3a5ff77b88d904607151bd285073cc6d7
Contents?: true
Size: 934 Bytes
Versions: 30
Compression:
Stored size: 934 Bytes
Contents
/ # TODO: This search scope isn't very maintainable - move to a scope on the query object once / I understand how to define this in Arel? Ideally the local_patient_id / should be an eq match and the other fields a cont (ilike)? / Note also we should really extend this so it searches all local_patient_ids - search_scope = :patient_given_name_or_patient_family_name_or_drug_name_or_patient_local_patient_id_cont - searching = search.send(search_scope).present? .filters .row = search_form_for(search, url: medications_esa_prescriptions_path) do |f| .small-7.medium-7.large-5.columns = f.search_field search_scope, placeholder: t(".search_prompt") .small-5.medium-5.columns.end = f.submit "Search", class: "button" = link_to t(".clear-search"), medications_esa_prescriptions_path, class: "cancel-link #{'disabled' unless searching}"
Version data entries
30 entries across 30 versions & 1 rubygems