def add_param_to_fragment(url, param_name, param_value)
      uri = URI(url)
      fragment = URI(uri.fragment || "!")
      params = URI.decode_www_form(fragment.query || "") << [param_name, param_value]
      fragment.query = URI.encode_www_form(params)
      uri.fragment = fragment.to_s
      uri.to_s
    end
def add_param_to_fragment(url, param_name, param_value)
      uri = URI(url)
      fragment = URI(uri.fragment || "!")
      params = URI.decode_www_form(fragment.query || "") << [param_name, param_value]
      fragment.query = URI.encode_www_form(params)
      uri.fragment = fragment.to_s
      uri.to_s
    end
Append params to the fragment part of an existing url String
   add_param_to_fragment("/#!/platform/accounts", 'foo', 'bar')
     => "/#!/platform/accounts?foo=bar"
   add_param_to_fragment("/#!/platform/dashboard/he/43?en=690", 'foo', 'bar')
     => "/#!/platform/dashboard/he/43?en=690&foo=bar"