Class: DynamicFieldsets::SelectField

Inherits:
Field
  • Object
show all
Defined in:
app/models/dynamic_fieldsets/select_field.rb

Overview

Select input with one selection possible

Instance Method Summary collapse

Methods inherited from Field

#collect_default_values, #collect_field_records_by_fsa_and_fsc, descendant_collection, descendants, #display_type, #form_footer_partial, #form_header_partial, #form_partial, #get_value_for_show, #get_values_using_fsa_and_fsc, #has_defaults?, #html_attribute_hash, #in_use?, #show_footer_partial, #show_header_partial, #show_partial, #show_partial_locals, #update_field_records, #use_form_footer_partial?, #use_form_header_partial?, #use_show_footer_partial?, #use_show_header_partial?, #uses_field_options?

Instance Method Details

#form_partial_locals(args) ⇒ Hash

Returns data for the form partial.

Returns:

  • (Hash)

    data for the form partial



8
9
10
11
12
13
# File 'app/models/dynamic_fieldsets/select_field.rb', line 8

def form_partial_locals(args)
  super.merge({
    :selected_id => value_or_default_for_form(args[:value]).to_i,
    :collection => self.options
  })
end