Ok, I got it to work with:
@events = @artist.medias.where(:type => 'Event')
On Oct 12, 7:53 pm, Erol Fornoles wrote:
> That's not how :through works. has_many :through associations are only
> used when there is an intermediate model between them.
>
> What you can do is:
>
> has_many :medias, :cl
That's not how :through works. has_many :through associations are only
used when there is an intermediate model between them.
What you can do is:
has_many :medias, :class_name => "Media" # Will return all media,
including paintings and videos
has_many :paintings, :class_name => "Painting"
has_man
2 matches
Mail list logo