I need help to display in the view the value in the view of a relationship with has_many.
I have my product model:
class Product < ActiveRecord::Base
paginates_per 15
has_many :product_images, :dependent => :delete_all
I'm doing a find on this model:
@products = Product.where(:active => 1).includes(:product_images)
But I can not do for example
@product.image_products.id
What's wrong? Thank you.