Is this a more concise way of writing this post:
current_user.products.where(:product_id => product.id).present?
Do the rails have something like?
current_user.products.has? product
I know that I can:
current_user.products.include? product
... but which downloads all products. I am trying to get an intelligent request from it.
source share