- Joined
- Sep 29, 2023
- Messages
- 2
- Reaction score
- 0
my where clasue with includes isn't working, it's returning all records instead of the expected filter
@items=Item.includessales).where("unit_price is not null and item_type_id=? and title like ?, @item_type_id, params[:search] and :sales => { :item_id => nil }").ordertitle)
@items=Item.includessales).where("unit_price is not null and item_type_id=? and title like ?, @item_type_id, params[:search] and :sales => { :item_id => nil }").ordertitle)