Method: Sequel::Plugins::ForbidLazyLoad::DatasetMethods#each

Defined in:
lib/sequel/plugins/forbid_lazy_load.rb

#eachObject

Mark model instances retrieved in this call as forbidding lazy loading.



184
185
186
187
188
189
190
191
192
193
# File 'lib/sequel/plugins/forbid_lazy_load.rb', line 184

def each
  if row_proc
    super do |obj|
      obj.forbid_lazy_load if obj.is_a?(InstanceMethods)
      yield obj
    end
  else
    super
  end
end