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_checkbox_list(column, select_options, associated_ids, options)
        label_method = column.options[:label_method] || :to_label
        html = hidden_field_tag("#{options[:name]}[]", '', :id => nil)
        html << content_tag(:ul, options.merge(:class => "#{options[:class]} checkbox-list#{' draggable-lists' if column.options[:draggable_lists]}")) do
          content = []
          select_options.each_with_index do |option, i|
            content << active_scaffold_checkbox_option(option, label_method, associated_ids, :name => "#{options[:name]}[]", :id => "#{options[:id]}_#{i}_id")
          end
          safe_join content
        end
        html
      end
def active_scaffold_checkbox_list ( column , select_options , associated_ids , options ) label_method = column . options [ :label_method ] || :to_label html = hidden_field_tag ( "#{options[:name]}[]" , '' , :id => nil ) html << content_tag ( :ul , options . merge ( :class => "#{options[:class]} checkbox-list#{' draggable-lists' if column.options[:draggable_lists]}" ) ) do content = [ ] select_options . each_with_index do | option , i | content << active_scaffold_checkbox_option ( option , label_method , associated_ids , :name => "#{options[:name]}[]" , :id => "#{options[:id]}_#{i}_id" ) end safe_join content end html end
This method decides which input to use for the given column.
This method decides which input to use for the given column .
column
<not_specific>
select_options
<not_specific>
associated_ids
<not_specific>
options
<not_specific>