Params Documentation?

Is there any documentation on the params method that gets returned
from .rhtml forms?

I looked in the RDocs for Rails / Ruby and found a brief glimpse in the
CGI module, but it isn't well defined there.

I'm wanting to know *exactly* where it gets its arguments from.

Too often I've seen params[:id] or params[:foo][:bar], without really
understanding where that data is coming from.

I thought that it would come from the 'name' parameter in the form, or
maybe even all the 'name's put into an Array or Hash, but I can't find
any docs to confirm nor deny.

from the console I tried params.class, and it doesn't know about about
params, so I'm missing something.


Hi Matt,

Params are basically what being sent from a form in a rhtml (or html)
the keys within the hash (params[:key1], params[:key2] for ex.) are the
names of the form input tags in the document.

if i have a text field for example:

<input type="text" name="username" />

than when i post this form to a controller action, params will contain

OK. That part I get, but how would the rhtml look for something that
returns: params[:user][:f_name] ?

And the docs mention something like:
<input type="text" name="username[]" />
so that you can access multiple params, but I didn't gather how I would
retrieve it in the controller.

And often times there is a call in a controller such as params[:user]
that is filling in all sorts of extra information (,,
etc) How is that rhtml generated?

Also, the docs are using both the id and name attributes of the
input/text form, why?

Also, what class is params associated with? I'd like to get into the
source a bit to get my answer, but I can even find my starting point.

The documentation for some of the details between view/controller with
CGI parameter passing is eluding me, though I have a 'rough' idea, I'd
like to know more.