projects
/
cs356-p2-videostore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use LIKE queries in the searches
[cs356-p2-videostore.git]
/
app
/
controllers
/
coitem_controller.rb
diff --git
a/app/controllers/coitem_controller.rb
b/app/controllers/coitem_controller.rb
index
224806d
..
73049f3
100644
(file)
--- a/
app/controllers/coitem_controller.rb
+++ b/
app/controllers/coitem_controller.rb
@@
-48,4
+48,10
@@
class CoitemController < ApplicationController
Coitem.find(params[:id]).destroy
redirect_to :action => 'list'
end
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
end