Method: ActiveRecord::Associations::Association#set_strict_loading
- Defined in:
- activerecord/lib/active_record/associations/association.rb
#set_strict_loading(record) ⇒ Object
123 124 125 126 127 128 129 |
# File 'activerecord/lib/active_record/associations/association.rb', line 123 def set_strict_loading(record) if owner.strict_loading_n_plus_one_only? && reflection.macro == :has_many record.strict_loading! else record.strict_loading!(false, mode: owner.strict_loading_mode) end end |