lib/active_scaffold/helpers/form_column_helpers.rb
# This method decides which input to use for the given column.
# It does not do any rendering. It only decides which method is responsible for rendering.
This method decides which input to use for the given column.
It does not do any rendering. It only decides which method is responsible for rendering.
This method decides which input to use for the given column . It does not do any rendering . It only decides which method is responsible for rendering .
def active_scaffold_radio_option(option, selected, column, radio_options)
        if column.association
          label_method = column.options[:label_method] || :to_label
          text = option.send(label_method)
          value = option.id
          checked = {:checked => selected == value}
        else
          text, value = active_scaffold_translated_option(column, *option)
        end
        id_key = radio_options[:"data-id"] ? :"data-id" : :id
        radio_options = radio_options.merge(id_key => radio_options[id_key] + '-' + value.to_s.parameterize)
        radio_options.merge!(checked) if checked
        content_tag(:label, radio_button(:record, column.name, value, radio_options) + text)
      end
def active_scaffold_radio_option ( option , selected , column , radio_options ) if column . association label_method = column . options [ :label_method ] || :to_label text = option . send ( label_method ) value = option . id checked = { :checked => selected == value } else text , value = active_scaffold_translated_option ( column , * option ) end id_key = radio_options [ :" data-id " ] ? :" data-id " : :id radio_options = radio_options . merge ( id_key => radio_options [ id_key ] + '-' + value . to_s . parameterize ) radio_options . merge! ( checked ) if checked content_tag ( :label , radio_button ( :record , column . name , value , radio_options ) + text ) end
This method decides which input to use for the given column.
This method decides which input to use for the given column .
option
<not_specific>
selected
<not_specific>
column
<not_specific>
radio_options
<not_specific>