lib/active_scaffold/helpers/batch_create_column_helpers.rb
def active_scaffold_batch_create_singular_association(column, html_options)
        associated_options = batch_create_by_records.collect {|r| r.id}
        select_options = options_for_association(column.association)
        html_options.update(column.options[:html_options] || {})
        options = {}
        options.update(column.options)
        html_options[:name] = "#{html_options[:name]}[]" 
        html_options[:multiple] = true
        select_tag(column.name, options_for_select(select_options.uniq, associated_options), html_options)
      end
# 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_batch_create_singular_association(column, html_options)
        associated_options = batch_create_by_records.collect {|r| r.id}
        select_options = options_for_association(column.association)
        html_options.update(column.options[:html_options] || {})
        options = {}
        options.update(column.options)
        html_options[:name] = "#{html_options[:name]}[]" 
        html_options[:multiple] = true
        select_tag(column.name, options_for_select(select_options.uniq, associated_options), html_options)
      end
def active_scaffold_batch_create_singular_association ( column , html_options ) associated_options = batch_create_by_records . collect { | r | r . id } select_options = options_for_association ( column . association ) html_options . update ( column . options [ :html_options ] || { } ) options = { } options . update ( column . options ) html_options [ :name ] = "#{html_options[:name]}[]" html_options [ :multiple ] = true select_tag ( column . name , options_for_select ( select_options . uniq , associated_options ) , html_options ) end
This method decides which input to use for the given column.
This method decides which input to use for the given column .
column
html_options