def assign_query_hash_to_params
      # Get a nested hash representing the current url params.
      query_hash = parse_query

      # Get the params that are in the route
      new_params = @router.url_to_params(path)

      fail "no routes match path: #{path}" if new_params == false

      return false if new_params == nil

      query_hash.merge!(new_params)

      # Loop through the .params we already have assigned.
      lparams = params
      assign_from_old(lparams, query_hash)
      assign_new(lparams, query_hash)

      true
    end
def assign_query_hash_to_params
      # Get a nested hash representing the current url params.
      query_hash = parse_query

      # Get the params that are in the route
      new_params = @router.url_to_params(path)

      fail "no routes match path: #{path}" if new_params == false

      return false if new_params == nil

      query_hash.merge!(new_params)

      # Loop through the .params we already have assigned.
      lparams = params
      assign_from_old(lparams, query_hash)
      assign_new(lparams, query_hash)

      true
    end
Assigning the params is tricky since we don't want to trigger changed on
 any values that have not changed.  So we first loop through all current
 url params, removing any not present in the params, while also removing
 them from the list of new params as added.  Then we loop through the
 remaining new parameters and assign them.