Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 518 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 518 Bytes

ActiveRecord-lax-includes

By default ActiveRecord will raise an error when trying to eager load association that doesn't exist.

This can be an issue with polymorphism or STI.

See this issue for more details: rails/rails#8005

Usage

ActiveRecord::lax_includes do
  # ... record with missing association are filtered out instead of raising an error
end

# back to normal `Association named '****' was not found; perhaps you misspelled it?` exception.