lib/active_scaffold/helpers/action_link_helpers.rb
# params which mustn't be copying to nested links
params which mustn't be copying to nested links
params which mustn ' t be copying to nested links
def replaced_action_link_url_options(link, record)
        url = cached_action_link_url_options(link, record)
        url[:controller] ||= params[:controller]
        missing_options, url_options = url.partition { |_, v| v.nil? }
        replacements = {}
        replacements['--ID--'] = record.id.to_s if record
        if link.column&.association&.singular?
          replacements['--CHILD_ID--'] = record.send(link.column.association.name)&.id.to_s
        elsif nested?
          replacements['--CHILD_ID--'] = params[nested.param_name].to_s
        end
        url_options.collect! do |k, v|
          [k.to_s, replacements[v] || v]
        end
        [missing_options, url_options]
      end
def replaced_action_link_url_options ( link , record ) url = cached_action_link_url_options ( link , record ) url [ :controller ] ||= params [ :controller ] missing_options , url_options = url . partition { | _ , v | v . nil? } replacements = { } replacements [ '--ID--' ] = record . id . to_s if record if link . column &. association &. singular? replacements [ '--CHILD_ID--' ] = record . send ( link . column . association . name ) &. id . to_s elsif nested? replacements [ '--CHILD_ID--' ] = params [ nested . param_name ] . to_s end url_options . collect! do | k , v | [ k . to_s , replacements [ v ] || v ] end [ missing_options , url_options ] end
params which mustn't be copying to nested links
params which mustn ' t be copying to nested links
link
<not_specific>
record
<not_specific>