module Sequel::Plugins::DatasetAssociations::ClassMethods
Public Instance Methods
Source
# File lib/sequel/plugins/dataset_associations.rb 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 do 66 define_method(meth){associated(name)} 67 alias_method(meth, meth) 68 end 69 ret 70 end
Set up a dataset method for each association to return an associated dataset
Calls superclass method