Hey everyone,
I’m just solidifying my understanding of ruby “example by example”.
Can someone let me know if I understand this correctly…
In my view I have the following…
<%= render :partial => “sidebar” ,
:locals => { :recent_messages => @recent_messages } %>
Am I correct when I say that I’m passing the “@recent_messages” as an
instance variable to the new partial? For example, in the new partial
if I did this…
<%= render :partial => “sidebar” ,
:locals => { :foo => @recent_messages } %>
Then “:foo” would be the instance variable that is available for use
in the partial. I’m simply passing the @recent_messages to that
instance variable name correct?
I just want to be sure I don’t have that backwards. I keep thinking
that @recent_messages is an instance variable, but it’s actually an
@variable.
Thanks!
Chris