Examples:
R(:items) # => /items
@person = Person.new # has a to_param of john-doe
R(@person) # => '/john-doe'
R(@person, :posts) # => '/john-doe/posts'
R(@person, :posts, :replied) # => '/john-doe/posts/replied'
@entry = Entry.create # has an id of 1001 for example and Ruby1.9
R(@entry) # => '/1001'
R(:entry, @entry) # => '/entry/1001'
R(:search, :q => 'Ruby', :page => 1) => '/search?q=Ruby&page=1'
R(:q => 'Ruby', :page => 1) => '?q=Ruby&page=1'
R(:q => ['first, 'second']) => '?q[]=first&q[]=second'
R(:user => { :lname => 'Doe', :fname => 'John' })
=> '?user[lname]=Doe&user[fname]=John'
R("http://google.com/search", :q => "Robots")
=> 'http://google.com/search?q=Robots'