R (Camping::Helpers)

    # File lib/camping-unabridged.rb, line 183
        def R(c,*g)
          p,h=/\(.+?\)/,g.grep(Hash)
          g-=h
          raise "bad route" unless u = c.urls.find{|x|
            break x if x.scan(p).size == g.size &&
              /^#{x}\/?$/ =~ (x=g.inject(x){|x,a|
                x.sub p,U.escape((a[a.class.primary_key]rescue a))})
          }
          h.any?? u+"?"+U.build_query(h[0]) : u
        end