This error is raised when trying to eager load a polymorphic association using a JOIN. Eager loading polymorphic associations is only possible with ActiveRecord::Relation#preload.
# File activerecord/lib/active_record/associations.rb, line 228 def initialize(reflection = nil) if reflection super("Cannot eagerly load the polymorphic association #{reflection.name.inspect}") else super("Eager load polymorphic error.") end end
© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.