Tuesday, August 28, 2012

[Rails] Re: How does the HTTP params Hash work?

Weston Platter wrote in post #1073624:
> I am working on a Rails engine. When I go from a Main Application route
> to
> an Engine route, I think I lose a HTTP param, which I need for a db
> query.
>
> *My questions are,*
> *
> *
> *1) When and how is the HTTP params Hash modified?*

AFAIK that all happens here in the Rails/Rack middleware stack.

http://guides.rubyonrails.org/rails_on_rack.html#action-controller-middleware-stack

The middleware that parses the user's data into the params hash is:
ActionDispatch::ParamsParser

At least as I understand it.

> *2) Is it possible that switching between a application route and engine
> route effects the params Hash?*

Sorry, I've not yet created a Rails engine so I don't know the answer to
this part.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate