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_show_new_subform_link(column, record, select_id, subform_id)
        data = {select_id: select_id, subform_id: subform_id, subform_text: as_(:add_existing), select_text: as_(:create_new)}
        label = data[record.send(column.name)&.new_record? ? :subform_text : :select_text]
        link_to(label, '#', data: data, class: 'show-new-subform')
      end
def active_scaffold_show_new_subform_link ( column , record , select_id , subform_id ) data = { select_id : select_id , subform_id : subform_id , subform_text : as_ ( :add_existing ) , select_text : as_ ( :create_new ) } label = data [ record . send ( column . name ) &. new_record? ? :subform_text : :select_text ] link_to ( label , '#' , data : data , class : 'show-new-subform' ) 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>
record
<not_specific>
select_id
<not_specific>
subform_id
<not_specific>