RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: jaozafra
Hey Jake,
Since we're doing it server-side, i think you should handle the case-insensitiveness on your code.
Looking at the example, we have a query
products = products.where("name like :search or category like :search", search: "%#{params[:sSearch]}%")
What i did to fix this is use "ilike" instead of "like". This way, we're doing a case insensitive like.
Hope this helps.
Hey Jake,
Since we're doing it server-side, i think you should handle the case-insensitiveness on your code.
Looking at the example, we have a query
What i did to fix this is use "ilike" instead of "like".
This way, we're doing a case insensitive like.
Hope this helps.