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.
This commit is contained in:
@@ -4,9 +4,5 @@ module Galleryable
|
|||||||
included do
|
included do
|
||||||
has_many :images, as: :imageable, inverse_of: :imageable, dependent: :destroy
|
has_many :images, as: :imageable, inverse_of: :imageable, dependent: :destroy
|
||||||
accepts_nested_attributes_for :images, allow_destroy: true, update_only: true
|
accepts_nested_attributes_for :images, allow_destroy: true, update_only: true
|
||||||
|
|
||||||
def image_url(style)
|
|
||||||
image&.attachment&.url(style) || ""
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user