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

Version Path
hackathon_manager-0.14.1 app/inputs/school_selection_input.rb
hackathon_manager-0.14.0 app/inputs/school_selection_input.rb
hackathon_manager-0.13.12 app/inputs/school_selection_input.rb
hackathon_manager-0.13.11 app/inputs/school_selection_input.rb
hackathon_manager-0.13.10 app/inputs/school_selection_input.rb
hackathon_manager-0.13.9 app/inputs/school_selection_input.rb
hackathon_manager-0.13.8 app/inputs/school_selection_input.rb
hackathon_manager-0.13.7 app/inputs/school_selection_input.rb
hackathon_manager-0.13.6 app/inputs/school_selection_input.rb
hackathon_manager-0.13.5 app/inputs/school_selection_input.rb
hackathon_manager-0.13.4 app/inputs/school_selection_input.rb
hackathon_manager-0.13.3 app/inputs/school_selection_input.rb
hackathon_manager-0.13.2 app/inputs/school_selection_input.rb
hackathon_manager-0.13.1 app/inputs/school_selection_input.rb
hackathon_manager-0.13.0 app/inputs/school_selection_input.rb
hackathon_manager-0.12.2 app/inputs/school_selection_input.rb
hackathon_manager-0.12.1 app/inputs/school_selection_input.rb
hackathon_manager-0.12.0 app/inputs/school_selection_input.rb
hackathon_manager-0.11.2 app/inputs/school_selection_input.rb
hackathon_manager-0.11.1 app/inputs/school_selection_input.rb