[Rails] Re: find in controller or view

2010-06-22 Thread Marnen Laibow-Koser
chewmanfoo wrote: > a tip when using partials: look into :locals option and use it > extensively. Don't assume that a partial can "see" things from the > controller - specify what you want the partial to see using :locals. > It'll pay off in the end. A most excellent tip. :object and :collection

[Rails] Re: find in controller or view

2010-06-22 Thread chewmanfoo
a tip when using partials: look into :locals option and use it extensively. Don't assume that a partial can "see" things from the controller - specify what you want the partial to see using :locals. It'll pay off in the end. On Jun 22, 10:39 am, Marnen Laibow-Koser wrote: > Ar Chron wrote: > > N

[Rails] Re: find in controller or view

2010-06-22 Thread Marnen Laibow-Koser
Ar Chron wrote: > Norm Scherer wrote: >> Is there some reason that it would be >> better to do it all in the view? > > No. > > Ideally, the view is only the presentation layer. > > Among other reasons, when you start reusing partials, it will be come > readily apparent why you want to marshal

[Rails] Re: find in controller or view

2010-06-21 Thread Ar Chron
Norm Scherer wrote: > Is there some reason that it would be > better to do it all in the view? No. Ideally, the view is only the presentation layer. Among other reasons, when you start reusing partials, it will be come readily apparent why you want to marshal the data in the controller, and m