mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-25 17:57:49 -05:00
Changed order of photo association relationship declarations
This commit is contained in:
@@ -2,8 +2,8 @@ module PhotoCapable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
has_many :photos, through: :photographings, as: :photographable
|
||||
has_many :photographings, as: :photographable, dependent: :destroy
|
||||
has_many :photos, through: :photographings, as: :photographable
|
||||
|
||||
scope :has_photos, -> { includes(:photos).where.not(photos: { id: nil }) }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user