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_render_subform_column(column, scope, crud_type, readonly, add_class = false, record = nil) 
        if add_class
          col_class = []
          col_class << 'required' if column.required?
          col_class << column.css_class unless column.css_class.nil? || column.css_class.is_a?(Proc)
          col_class << 'hidden' if column_renders_as(column) == :hidden
          col_class << 'checkbox' if column.form_ui == :checkbox
          col_class = col_class.join(' ')
        end
        if readonly && !record.new_record? || !record.authorized_for?(:crud_type => crud_type, :column => column.name)
          form_attribute(column, record, scope, true, col_class)
        else
          renders_as = column_renders_as(column)
          html = render_column(column, record, renders_as, scope, false, col_class)
          html = content_tag(:div, html, active_scaffold_subform_attributes(column)) if renders_as == :subform
          html
        end
      end
def active_scaffold_render_subform_column ( column , scope , crud_type , readonly , add_class = false , record = nil ) if add_class col_class = [ ] col_class << 'required' if column . required? col_class << column . css_class unless column . css_class . nil? || column . css_class . is_a? ( Proc ) col_class << 'hidden' if column_renders_as ( column ) == :hidden col_class << 'checkbox' if column . form_ui == :checkbox col_class = col_class . join ( ' ' ) end if readonly && ! record . new_record? || ! record . authorized_for? ( :crud_type => crud_type , :column => column . name ) form_attribute ( column , record , scope , true , col_class ) else renders_as = column_renders_as ( column ) html = render_column ( column , record , renders_as , scope , false , col_class ) html = content_tag ( :div , html , active_scaffold_subform_attributes ( column ) ) if renders_as == :subform html end end
This method decides which input to use for the given column.
This method decides which input to use for the given column .
# rubocop:disable Metrics/ParameterLists
column
<not_specific>
scope
<not_specific>
crud_type
<not_specific>
readonly
<not_specific>
add_class
<not_specific>
record
<not_specific>