Sha256: ae3ef769a31ebf9d5aefa64e403d3c2ceff2f04ab8a69ae58404806295a1e530
Contents?: true
Size: 734 Bytes
Versions: 8
Compression:
Stored size: 734 Bytes
Contents
require_dependency "renalware/letters" require_dependency "collection_presenter" module Renalware module Letters class ContactsPresenter < CollectionPresenter # An array of contacts for use in a simple_form drop down. # The data-salutation is added (the final hash argument very kindly merges * onto the <option> # so we could add other options here too. def array_for_drop_down_with_options map do |contact| [ contact.name_and_description, contact.id, { data: { salutation: contact.salutation, class: ".has_salutation" } } ] end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems