search for: categoryhash

Displaying 1 result from an estimated 1 matches for "categoryhash".

2005 Dec 27
6
avoid multiple render per action
...but you can only render once per action. What is the best way to loop thru all my categories without a multiple render? I am trying to avoid things like @cat1 = Post.find(:conditions => "cat = 1") .. especially since my categories are dynamic. and would like to do something like categoryhash.each { |c| @entries = Post.find(:all, :conditions => ["catid = ?",c.]) render partial } Any ideas ? thanks adam