This is my shema :
class Media< ApplicationRecord
has_many :pictures
has_many :videos
end
class Picture < ApplicationRecord
belongs_to :media
end
class Video < ApplicationRecord
belongs_to :media
end
Is it possible to get all medias that correspond to the model picture?