From bc18a6e10e75c97305c2299ab431e9e2ed2fbcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 27 Jul 2021 02:48:44 +0200 Subject: [PATCH] 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. --- app/models/concerns/galleryable.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/models/concerns/galleryable.rb b/app/models/concerns/galleryable.rb index b50e65675..8ba3c48d8 100644 --- a/app/models/concerns/galleryable.rb +++ b/app/models/concerns/galleryable.rb @@ -4,9 +4,5 @@ module Galleryable included do has_many :images, as: :imageable, inverse_of: :imageable, dependent: :destroy accepts_nested_attributes_for :images, allow_destroy: true, update_only: true - - def image_url(style) - image&.attachment&.url(style) || "" - end end end