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_add_existing_input(options)
        record = options.delete(:object)
        if !ActiveScaffold.js_framework.nil? && controller.respond_to?(:record_select_config, true)
          remote_controller = active_scaffold_controller_for(record_select_config.model).controller_path
          options[:controller] = remote_controller
          options.merge!(active_scaffold_input_text_options)
          record_select_field(options[:name], nil, options)
        else
          select_options = sorted_association_options_find(nested.association, nil, record)
          select_options ||= active_scaffold_config.model.all
          select_options = options_from_collection_for_select(select_options, :id, :to_label)
          select_tag 'associated_id', (content_tag(:option, as_(:_select_), value: '') + select_options) unless select_options.empty?
        end
      end
def active_scaffold_add_existing_input ( options ) record = options . delete ( :object ) if ! ActiveScaffold . js_framework . nil? && controller . respond_to? ( :record_select_config , true ) remote_controller = active_scaffold_controller_for ( record_select_config . model ) . controller_path options [ :controller ] = remote_controller options . merge! ( active_scaffold_input_text_options ) record_select_field ( options [ :name ] , nil , options ) else select_options = sorted_association_options_find ( nested . association , nil , record ) select_options ||= active_scaffold_config . model . all select_options = options_from_collection_for_select ( select_options , :id , :to_label ) select_tag 'associated_id' , ( content_tag ( :option , as_ ( :_select_ ) , value : '' ) + select_options ) unless select_options . empty? end end
This method decides which input to use for the given column.
This method decides which input to use for the given column .
options
<not_specific>