On Tue, Sep 30, 2008 at 7:54 AM, Phillip Koebbe
<[EMAIL PROTECTED]> wrote:
>
> I've been vacillating between using the :locals hash and instance
> variables when passing data to partials. Is there a valid reason to use
> one over the other? What could be considered a best practice in the
> Rails community? I did some googling but didn't turn anything up.
>

As a general rule of thumb, you'll want to be conservative when it
comes to scoping your variables. In my opinion, it's best to use
locals and not rely on an instance variable.

Cheers,

Robby

-- 
Robby Russell
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting

http://www.planetargon.com/
http://www.robbyonrails.com/
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to