lib/active_scaffold/helpers/form_column_helpers.rb
# the standard active scaffold options used for class, name and scope
the standard active scaffold options used for class, name and scope
the standard active scaffold options used for class name and scope
def active_scaffold_input_options(column, scope = nil, options = {})
        name = scope ? "record#{scope}[#{column.name}]" : "record[#{column.name}]"
        record = options[:object]
        if column.required? && (!@disable_required_for_new || scope.nil? || record&.persisted?)
          options[:required] = true
        end
        options[:placeholder] = column.placeholder if column.placeholder.present?
        id_control = "record_#{column.name}_#{[params[:eid], params[:parent_id] || params[:id]].compact.join '_'}"
        id_control += scope_id(scope) if scope
        classes = "#{column.name}-input"
        classes += ' numeric-input' if column.number?
        {:name => name, :class => classes, :id => id_control}.merge(options)
      end
def active_scaffold_input_options ( column , scope = nil , options = { } ) name = scope ? "record#{scope}[#{column.name}]" : "record[#{column.name}]" record = options [ :object ] if column . required? && ( ! @disable_required_for_new || scope . nil? || record &. persisted? ) options [ :required ] = true end options [ :placeholder ] = column . placeholder if column . placeholder . present? id_control = "record_#{column.name}_#{[params[:eid], params[:parent_id] || params[:id]].compact.join '_'}" id_control += scope_id ( scope ) if scope classes = "#{column.name}-input" classes += ' numeric-input' if column . number? { :name => name , :class => classes , :id => id_control } . merge ( options ) end
the standard active scaffold options used for class, name and scope
the standard active scaffold options used for class name and scope
# Add some HTML5 attributes for in-browser validation and better user experience # Fix for keeping unique IDs in subform
column
<not_specific>
scope
<not_specific>
options
<not_specific>