Hi guys, iam just wondering, can i use a shared partial with a controller? In my project, i have in my views folder, a shared_partials folder where i put my partials. In my controller eg books_controller i make a search @books= Books.find(:all) and i want to show the results in the partial using the for loop book @books etc . Allthouh this works when i am in the controller views, when i am in the shared_partials views does not works. Any suggestions? Thanx Kostas L.
Hi Can''t you use like render :partial => "shared/partial_name", :locals => {:books => @books} Sijo -- Posted via http://www.ruby-forum.com/.
Thanx Sijo that worked! I''ve really forgotten :locals usage!!! On Aug 6, 1:48 pm, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > Can''t you use like > > render :partial => "shared/partial_name", :locals => {:books => @books} > > Sijo > -- > Posted viahttp://www.ruby-forum.com/.