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 query_string_for_action_links(link)
        if defined?(@query_string) && link.parameters.none? { |k, _| @query_string_params.include? k }
          return [@query_string, @non_nested_query_string]
        end
        keep = true
        @query_string_params ||= Set.new
        query_string_options = {}
        non_nested_query_string_options = {}
        params_for.except(:controller, :action, :id).each do |key, value|
          @query_string_params << key
          if link.parameters.include? key
            keep = false
            next
          end
          if ignore_param_for_nested?(key)
            non_nested_query_string_options[key] = value
          else
            query_string_options[key] = value
          end
        end
        if nested_singular_association? && action_name == 'index'
          @query_string_params << :return_to
          non_nested_query_string_options[:return_to] = request.fullpath
        end
        query_string = query_string_options.to_query if query_string_options.present?
        if non_nested_query_string_options.present?
          non_nested_query_string = "#{'&' if query_string}#{non_nested_query_string_options.to_query}"
        end
        if keep
          @query_string = query_string
          @non_nested_query_string = non_nested_query_string
        end
        [query_string, non_nested_query_string]
      end
def query_string_for_action_links ( link ) if defined? ( @query_string ) && link . parameters . none? { | k , _ | @query_string_params . include? k } return [ @query_string , @non_nested_query_string ] end keep = true @query_string_params ||= Set . new query_string_options = { } non_nested_query_string_options = { } params_for . except ( :controller , :action , :id ) . each do | key , value | @query_string_params << key if link . parameters . include? key keep = false next end if ignore_param_for_nested? ( key ) non_nested_query_string_options [ key ] = value else query_string_options [ key ] = value end end if nested_singular_association? && action_name == 'index' @query_string_params << :return_to non_nested_query_string_options [ :return_to ] = request . fullpath end query_string = query_string_options . to_query if query_string_options . present? if non_nested_query_string_options . present? non_nested_query_string = "#{'&' if query_string}#{non_nested_query_string_options.to_query}" end if keep @query_string = query_string @non_nested_query_string = non_nested_query_string end [ query_string , non_nested_query_string ] end
params which mustn't be copying to nested links
params which mustn ' t be copying to nested links
# pass current path as return_to, for nested listing on singular association, so forms doesn't return to parent listing
link
<not_specific>