This commit is contained in:
Aung Myo
2017-08-04 15:25:19 +06:30
parent e71ca0dee8
commit a4d2fc53b0
3 changed files with 10 additions and 16 deletions

View File

@@ -322,8 +322,7 @@ class Order < ApplicationRecord
def self.search(search)
if search
# find(:all, :conditions => ['name LIKE ? OR contact_no LIKE ?', "%#{search}%", "%#{search}%"])
where("order_id LIKE ?", "%#{search}%")
where("order_id LIKE ? OR item_count ='#{search}'","%#{search}%",)
else
find(:all)
end