Your models should be like:
class Product < ActiveRecord::Base
has_many :orders
end
class Order < ActiveRecord::Base
belongs_to :product
belongs_to :user
end
Now you can do:
Order.joins(:product).all
But what are you trying to achieve? What is reason for this pointless join? If you just want to preload the products so there isn't any additional queries to your database, you can use includes
instead of joins.