X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fcoitem_controller.rb;h=152f40b17f50ae651049f26c61fe7db61dbba81d;hb=de5e46c88f07fd828548ab7226cb7a0c5ebe59d5;hp=ef8ea7c074cc3779f6c1b420e864bce42886ad58;hpb=aafbf2bd36dcfa82f56d4586fa19a7d9a1f815e6;p=cs356-p2-videostore.git diff --git a/app/controllers/coitem_controller.rb b/app/controllers/coitem_controller.rb index ef8ea7c..152f40b 100644 --- a/app/controllers/coitem_controller.rb +++ b/app/controllers/coitem_controller.rb @@ -47,6 +47,12 @@ class CoitemController < ApplicationController render :action => 'overdue' end + def filterbycustomerid + query = params[:id] + @coitem_pages, @coitems = paginate :coitems, :per_page => 20, :conditions => ["customer_id = ?", query] + render :action => 'list' + end + def return if request.post? rentable_id = params[:rentable_id]