Method: Sequel::Plugins::ForbidLazyLoad::DatasetMethods#with_sql_each
- Defined in:
- lib/sequel/plugins/forbid_lazy_load.rb
#with_sql_each(sql) ⇒ Object
Mark model instances retrieved in this call as forbidding lazy loading.
196 197 198 199 200 201 202 203 204 205 |
# File 'lib/sequel/plugins/forbid_lazy_load.rb', line 196 def with_sql_each(sql) if row_proc super(sql) do |obj| obj.forbid_lazy_load if obj.is_a?(InstanceMethods) yield obj end else super end end |