Im making a Cart for my site, so I make Orders Controller to manage Orders so inside I do def add_product @product = Product.find(params[:id]) @order = Order.find_by_client_id(current_user.id) @order.products << @product end on Product view/show I place <%= link_to t(:add_to_cart), order_add_product_path(@product) %> config/routes resources :orders do get :add_product end But i kept getting http://localhost:3000/orders/3/add_product ActiveRecord::RecordNotFound in OrdersController#add_product Couldn''t find Product without an ID model: orders has_and_belongs_to_many :products products has_and_belongs_to_many :orders -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.