Vince, assuming action1 does something and then renders to the browser
then the answer to your question is "yes" but not perhaps in the way
you were thinking.
The web being a stateless world, nothing is remembered after the end
of your action1 (unless you take action to store some stuff that you
can restore up again). Each request, action and response is brand new
every time. Nothing of the last action, or any action is remembered.
Therefore at the start of action2 there is nothing remembered unless
you took action to store and restore what you need.
Cheers, --Kip
On Aug 7, 9:24 pm, Vince
<ewald.koe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all,
>
> class SomethingController < ApplicationController
>
> def action1
> @instance_var = SomeClass.find(1)
> end
>
> def action2
> #...
> end
>
> end
>
> It seems I have to assign @instance_var as well in action2, even I run
> through action1 earlier?
> If I don''t assign it, @instance_var is nil in action2.rhtml.
>
> Is my assumption correct or do I miss something?
>
> Vince
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---