I have a model entity called Project that can have one of three priority states: high (1), medium (2), low (3). What I want to do is show all ongoing projects from high -- low priority. #controller @projects = Project.find(:all, :conditions => ["status = 'ongoing'"], :order => "priority asc") My view looks like this: <div id="project_list"> <% unless @projects.empty? %> <%= render(:partial => "project", :collection => @projects) %> <% else %> <p>No projects have been created yet.</p> <% end %> </div> The _project partial simply spits out the details for an individual project. So how do I display projects like this: 1. High Priority --- list of high projects 2. Medium Priority --- list of medium priority projects 3. Low Priority --- list of low priority projects Thanks for the help!
on 2007-01-22 17:40