2

I am trying to get to grips with the params hash in RoR. I'm not sure if I'm missing something, but my understanding so far is that the params hash is a hash containing either form entered data or query string data related to a POST request. Where params[:item] creates a symbol where the relevant POST data/query is stored. Again not sure if I'm correct on this, any enlightenment would be much appreciated. Thanks

Tom
  • 2,065
  • 5
  • 20
  • 21
  • 1
    This SO post may be helpful to you: http://stackoverflow.com/questions/6885990/rails-params-explained – MrDanA May 10 '12 at 12:56

1 Answers1

2

The params hash is described in detail in the Action Controller Overview. TL;DR: the params hash holds all GET or POST parameters passed to the controller, as well as the :controller and :action keys.

Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199
  • thanks I think I was just being thrown by the use of the params part, it makes a lot more sense when attached to the HTTP context. – Tom May 12 '12 at 17:02