I have a controller to sort by time... def index @shows = Show.all(:all, :order => ''time'') respond_to do |format| format.html format.xml { render :xml => @shows } end end ...which works fine when you view the ''shows'' index.html.erb. But I made a partial called _show_list.html.erb (which is ''shows'' index.html.erb) but it doesn''t sort the listings by time. -- Posted via http://www.ruby-forum.com/.
> But I made a partial called _show_list.html.erb (which is ''shows'' > index.html.erb) but it doesn''t sort the listings by time.BTW the partial is located in a different ''veiw'' as its supposed to. -- Posted via http://www.ruby-forum.com/.
Nevermind. I figured it out I just needed to add (:all, :order => ''time'') to the render. -- Posted via http://www.ruby-forum.com/.
Have a look at named_scope and default_scope. These may save you sprinkling :order specs around the place. Colin 2009/6/9 Aaron Day <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Nevermind. I figured it out I just needed to add (:all, :order => > ''time'') to the render. > -- > Posted via http://www.ruby-forum.com/. > > > >