mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-30 01:44:28 -04:00
Changed order of photo association relationship declarations
This commit is contained in:
1 parent
4917ab9ae8
commit
d456d045cd
1 file changed
+1
-1
@@ -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