Hi,
I want to know that how 'params' get created in rails?
when http: request comes we have get all parameter using hash params
e.g:- params[:id]
But in ActionController how params get created and how it is
initialised there?
Also what is scope for params?
Hi,
I want to know that how 'params' get created in rails?
when http: request comes we have get all parameter using hash params
e.g:- params[:id]
But in ActionController how params get created and how it is
initialised there?
Also what is scope for params?
It's created from the request body and query string (details of the
parsing are in request.rb).
It's an instance method on controllers (which views can call via the
usual magic).
Unless there's something specific you're after you're better off
reading the code yourself. It's just a bunch of regexpy type things
pulling apart the query string/form data