Acquiring data from non-pair POST params

Screwy title, but what I am trying to do is...

I have an incoming POST to a typical Rails /:controller/:action url.

That post has one value, not a name-value pair. So, Rail's params has that data as a key (along with the other stuff Rails adds to params). Now, in my current fiddling, it can be extracted as params.keys[0] -- but I don't think I can count on that position as the params hash is, well, a hash.

Is there a better way to acquire this data?

-- gw

Screwy title, but what I am trying to do is...

I have an incoming POST to a typical Rails /:controller/:action url.

That post has one value, not a name-value pair. So, Rail's params has that data as a key (along with the other stuff Rails adds to params). Now, in my current fiddling, it can be extracted as params.keys[0] -- but I don't think I can count on that position as the params hash is, well, a hash.

Is there a better way to acquire this data?

look at request.raw_post ?

Fred

Hi Greg,

I did something like this:

http://localhost:3000/my_controller/my_action/success

and in the controller, params[:id] == 'success'

I'm pretty sure that works because

http://localhost:3000/my_controller/my_action/1

the 1 gets mapped to :id automatically. That was my reasoning anyway, and so far it has worked correctly. I don't know if that will work for you or not. And I'm not using any special/custom routing. Just the plain stuff that Rails 1.2.3 defines.

Peace, Phillip