Closed devsheva closed 11 months ago
Example:
# Order class Order < ApplicationRecord has_many :order_items, dependent: :destroy # OrderItem class OrderItem < ApplicationRecord belongs_to :order belongs_to :itemable, polymorphic: true, optional: true # Ransack query order_items_itemable_of_DomainContract_type_dns_eq: chunk
Given error:
ActiveRecord::EagerLoadPolymorphicError: Cannot eagerly load the polymorphic association :itemable
Anyone has experienced the same problem, or knows a workaround ?
EDIT: My bad, i'll close this issue, it was a bug in my test
Example:
Given error:
ActiveRecord::EagerLoadPolymorphicError: Cannot eagerly load the polymorphic association :itemable
Anyone has experienced the same problem, or knows a workaround ?