Topic: Don't get access to associated Tables with .include()
I'm a beginner in coding Rails and have a problem with joining tables. I have 2 models:
class Price < ActiveRecord::Base belongs_to :product end class Product < ActiveRecord::Base has_many :prices end
Now I want to get a List of all Products with their prices. (One product has many prices, because I want to save price changes).
but this only returns the whole Product table without the prices.
With .joins() it's the same.