| Module | Sequel::Plugins::DatasetAssociations::ClassMethods |
| In: |
lib/sequel/plugins/dataset_associations.rb
|
Set up a dataset method for each association to return an associated dataset
# File lib/sequel/plugins/dataset_associations.rb, line 53
53: def associate(type, name, *)
54: ret = super
55: r = association_reflection(name)
56: meth = r.returns_array? ? name : pluralize(name).to_sym
57: def_dataset_method(meth){associated(name)}
58: ret
59: end