module VaccinesHelper
Public Instance Methods
Source
# File app/helpers/vaccines_helper.rb, line 4 def vaccine_heading(vaccine) "#{vaccine.brand} (#{vaccine.programme.name})" end
Source
# File app/helpers/vaccines_helper.rb, line 8 def vaccine_method(vaccine) return unless vaccine vaccine.human_enum_name(:method)&.downcase end
Source
# File app/helpers/vaccines_helper.rb, line 14 def vaccine_side_effects_list(vaccine) return if vaccine.nil? vaccine .side_effects .map { Vaccine.human_enum_name(:side_effect, it) } .sort .uniq .map { "- #{it}" } .join("\n") end