In code:
<% @hotelUser=HotelUser.find( cookies[:user_id2]) %>
<%= debug @orderLast=Order.where(:email=>@hotelUser.email,"order.hotel_user_id IS NOT NULL").last%>
I am getting syntax error after executing this code.I want to search hotel_user_id
where hotel_user_id != nil or empty?
. Please tell me the right syntax.
Order.where(email: @hotelUser.email).where.not(hotel_user_id: nil)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With