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 replace_id_params_in_action_link_url(link, record, url)
        url = record ? url.sub('--ID--', record.to_param.to_s) : url.clone
        if link.column&.association&.singular?
          child_id = record.send(link.column.association.name)&.to_param
          if child_id.present?
            url.sub!('--CHILD_ID--', child_id)
          else
            url.sub!(/\w+=--CHILD_ID--&?/, '')
            url.sub!(/\?$/, '')
          end
        elsif nested?
          url.sub!('--CHILD_ID--', params[nested.param_name].to_s)
        end
        url
      end
def replace_id_params_in_action_link_url ( link , record , url ) url = record ? url . sub ( '--ID--' , record . to_param . to_s ) : url . clone if link . column &. association &. singular? child_id = record . send ( link . column . association . name ) &. to_param if child_id . present? url . sub! ( '--CHILD_ID--' , child_id ) else url . sub! ( / \w +=--CHILD_ID--&? / , '' ) url . sub! ( / \? $ / , '' ) end elsif nested? url . sub! ( '--CHILD_ID--' , params [ nested . param_name ] . to_s ) end url 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>
url
<not_specific>