http://www.someapp.com/events/12345
I just need the 12345
Obviously, params[:id] won't work so I'm not sure how to get this. I
tried this:
url = data['referring_site']
event_id = CGI::parse(URI::parse(url).query)
But it didn't work.
Where the referring_site was the URL in question.
Thanks
Brad
For what it's worth, a request to that URL should be sent using the HTTP
PUT method. If I'm not mistaken Rails should then automatically provide
"12345" in params[:id].
But, the provided solutions should work for your needs.
--
Posted via http://www.ruby-forum.com/.