Exception: ActiveRecord::StrictLoadingViolationError

Inherits:
ActiveRecordError show all
Defined in:
activerecord/lib/active_record/errors.rb

Overview

Raised on attempt to lazily load records that are marked as strict loading.

You can resolve this error by eager loading marked records before accessing them. The Loading Associations[https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations] guide covers solutions, such as using Base.includes[rdoc-ref:QueryMethods#includes].