Files
nairobi/app/models/concerns/galleryable.rb
Javi Martín bc18a6e10e Remove unused url method in poll question answers
This method would never work because it relies on the `image`
association, instead of the `images` association defined in the
`Galleryable` module.
2021-09-24 16:36:35 +02:00

9 lines
240 B
Ruby

module Galleryable
extend ActiveSupport::Concern
included do
has_many :images, as: :imageable, inverse_of: :imageable, dependent: :destroy
accepts_nested_attributes_for :images, allow_destroy: true, update_only: true
end
end