You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classRating < RivoApplicationRecordself.primary_keys=:id,:shop_idhas_many_attached:images
...
end
Basically ActiveStoragepolymorphic table only supports one primary id under record_id for storage, but that's fine. We would just want to continue to record the :id instead of [:id, :shop_id]
At the moment, the fetching looks fine
# Rails Consolerating=Rating.firstrating.images.first# ActiveStorage::Attachment Load (1.5ms) # SELECT "active_storage_attachments".* FROM "active_storage_attachments"# WHERE "active_storage_attachments"."record_id" = 1 AND "active_storage_attachments"."record_type" = 'Rating' # AND "active_storage_attachments"."name" = 'images' ORDER BY "active_storage_attachments"."id" ASC LIMIT 1
However, the attach action can't seem to grep any :id correctly.
Hi @cfis, thanks for the nice gem.
Currently we have a simple setup
Basically
ActiveStorage
polymorphic table only supports one primary id underrecord_id
for storage, but that's fine. We would just want to continue to record the:id
instead of[:id, :shop_id]
At the moment, the fetching looks fine
However, the
attach
action can't seem to grep any:id
correctly.Thanks for you help!
The text was updated successfully, but these errors were encountered: