| 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 61
61: def associate(type, name, *)
62: ret = super
63: r = association_reflection(name)
64: meth = r.returns_array? ? name : pluralize(name).to_sym
65: dataset_module{define_method(meth){associated(name)}}
66: ret
67: end