Method: Sequel::Model::Associations::DatasetMethods#as_hash
- Defined in:
- lib/sequel/model/associations.rb
#as_hash(key_column = nil, value_column = nil, opts = OPTS) ⇒ Object
If the dataset is being eagerly loaded, default to calling all instead of each.
3344 3345 3346 3347 3348 3349 3350 |
# File 'lib/sequel/model/associations.rb', line 3344 def as_hash(key_column=nil, value_column=nil, opts=OPTS) if (@opts[:eager_graph] || @opts[:eager]) && !opts.has_key?(:all) opts = Hash[opts] opts[:all] = true end super end |