Sha256: bfb5d8ab4c91af8ad1c3ca6164fba2c75a5ea3b1ccc4e84fd8d7225331442d19
Contents?: true
Size: 546 Bytes
Versions: 63
Compression:
Stored size: 546 Bytes
Contents
class SchoolSelectionInput < SimpleForm::Inputs::Base def input(wrapper_options) merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) input_name = attribute_name.to_s.gsub(/_id/, '_name') value = options[:value] || @builder.object.send(attribute_name).blank? ? '' : @builder.object.school.name text_field_options = merged_input_options.merge(data: { school_picker: true }, name: "#{object_name}[#{input_name}]", value: value) template.text_field(input_name, value, text_field_options) end end
Version data entries
63 entries across 63 versions & 1 rubygems