Find URL paramenters from a string

6 views
Skip to first unread message

Renato Co

unread,
Aug 8, 2013, 1:29:54 PM8/8/13
to rubyonra...@googlegroups.com
I have a string which contain some parameters I want to extract but I
cant get it to look good. Here is what I have right now


puts
Rack::Utils.parse_query("http://www.aspnetpage.com/frmindex?id=5&shelf=111")
{"http://www.aspnetpage.com/frmindex?id"=>"5", "shelf"=>"111"}

As you can see my main problem is that the first parameter name ... how
what is the right method for this??

--
Posted via http://www.ruby-forum.com/.

Dheeraj Kumar

unread,
Aug 8, 2013, 1:33:31 PM8/8/13
to rubyonra...@googlegroups.com
Pass it only the string after the `?`

-- 
Dheeraj Kumar

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages