Reputation: 17834
I want to see all the products in the products table except those products which belongs to the current_user:
products_controller.rb
def index
@products = Product.all
end
routes.rb
resources :users do
resources :products
end
Upvotes: 0
Views: 62