Equivalent of request.setAttribute(key, value) in Rails?

Hi All

I come from Java/J2EE background and I was wondering if there was any
way of
setting an attribute-value in request.

As far as I understand the equivalent is/are the controller instance
variable that are exposed to the view(templates/layout). But they are
not
the same as storing values in request objects in Java servlets. Plus I
feel
this can give rise to race condition and data swapping between multiple
requests in production environment. Because from what I have read in
production environment there is only one instance of each controller
that
will serve all requests, hence the instance variables will be re-used
across
multiple requests. As these instance variables are used to render data
in
views is it not possible that a race condition arise where a new
requests
changes the same instance variable that they previous request was using
to
render the view.

Please help me understand and allay my concerns

thanks
-daya

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs