lib/active_scaffold/helpers/search_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_search_datetime(column, options)
        _, from_value, to_value = field_search_params_range_values(column)
        options = column.options.merge(options)
        type = "#{'date' unless options[:discard_date]}#{'time' unless options[:discard_time]}"
        use_select = options.delete(:use_select)
        from_name = "#{options[:name]}[from]"
        to_name = "#{options[:name]}[to]"
        if use_select
          helper = "select_#{type}"
          fields = [
            send(helper, field_search_datetime_value(from_value), options.reverse_merge(include_blank: true, prefix: from_name)),
            send(helper, field_search_datetime_value(to_value), options.reverse_merge(include_blank: true, prefix: to_name))
          ]
        else
          helper = "#{type}#{'_local' if type == 'datetime'}_field_tag"
          fields = [
            send(helper, from_name, field_search_datetime_value(from_value), options.except(:name, :object).merge(id: "#{options[:id]}_from")),
            send(helper, to_name, field_search_datetime_value(to_value), options.except(:name, :object).merge(id: "#{options[:id]}_to"))
          ]
        end
        safe_join fields, ' - '
      end
def active_scaffold_search_datetime ( column , options ) _ , from_value , to_value = field_search_params_range_values ( column ) options = column . options . merge ( options ) type = "#{'date' unless options[:discard_date]}#{'time' unless options[:discard_time]}" use_select = options . delete ( :use_select ) from_name = "#{options[:name]}[from]" to_name = "#{options[:name]}[to]" if use_select helper = "select_#{type}" fields = [ send ( helper , field_search_datetime_value ( from_value ) , options . reverse_merge ( include_blank : true , prefix : from_name ) ) , send ( helper , field_search_datetime_value ( to_value ) , options . reverse_merge ( include_blank : true , prefix : to_name ) ) ] else helper = "#{type}#{'_local' if type == 'datetime'}_field_tag" fields = [ send ( helper , from_name , field_search_datetime_value ( from_value ) , options . except ( :name , :object ) . merge ( id : "#{options[:id]}_from" ) ) , send ( helper , to_name , field_search_datetime_value ( to_value ) , options . except ( :name , :object ) . merge ( id : "#{options[:id]}_to" ) ) ] end safe_join fields , ' - ' 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>
options
<not_specific>