Use LIKE queries in the searches
[cs356-p2-videostore.git] / app / controllers / coitem_controller.rb
index 224806d..73049f3 100644 (file)
@@ -48,4 +48,10 @@ class CoitemController < ApplicationController
     Coitem.find(params[:id]).destroy
     redirect_to :action => 'list'
   end
+
+  # Awesome, paginating overdue list, ordered by customer
+  def overdue
+    @coitem_pages, @coitems = paginate :coitems, :per_page => 50, :conditions => "due_date < DATE('NOW', 'LOCALTIME')", :order => "customer_id"
+    render :action => 'list'
+  end
 end