lib/active_scaffold/helpers/form_column_helpers.rb
def active_scaffold_refresh_link(column, html_options, record)
        link_options = {:object => record}
        if html_options['data-update_url']
          link_options['data-update_send_form'] = html_options['data-update_send_form']
          link_options['data-update_send_form_selector'] = html_options['data-update_send_form_selector']
        else
          scope = html_options[:name].scan(/^record((\[[^\]]*\])*)\[#{column.name}\]/).dig(0, 0) if html_options[:name]
          link_options = update_columns_options(column, scope.presence, link_options, true)
        end
        link_options[:class] = 'refresh-link'
        link_to(as_(:refresh), link_options.delete('data-update_url') || html_options['data-update_url'], link_options)
      end
# 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_refresh_link(column, html_options, record)
        link_options = {:object => record}
        if html_options['data-update_url']
          link_options['data-update_send_form'] = html_options['data-update_send_form']
          link_options['data-update_send_form_selector'] = html_options['data-update_send_form_selector']
        else
          scope = html_options[:name].scan(/^record((\[[^\]]*\])*)\[#{column.name}\]/).dig(0, 0) if html_options[:name]
          link_options = update_columns_options(column, scope.presence, link_options, true)
        end
        link_options[:class] = 'refresh-link'
        link_to(as_(:refresh), link_options.delete('data-update_url') || html_options['data-update_url'], link_options)
      end
def active_scaffold_refresh_link ( column , html_options , record ) link_options = { :object => record } if html_options [ 'data-update_url' ] link_options [ 'data-update_send_form' ] = html_options [ 'data-update_send_form' ] link_options [ 'data-update_send_form_selector' ] = html_options [ 'data-update_send_form_selector' ] else scope = html_options [ :name ] . scan ( / ^record(( \[ [^ \] ]* \] )*) \[ #{ column . name } \] / ) . dig ( 0 , 0 ) if html_options [ :name ] link_options = update_columns_options ( column , scope . presence , link_options , true ) end link_options [ :class ] = 'refresh-link' link_to ( as_ ( :refresh ) , link_options . delete ( 'data-update_url' ) || html_options [ 'data-update_url' ] , link_options ) end
This method decides which input to use for the given column.
This method decides which input to use for the given column .
column
html_options
record