Sha256: 5322686fa6c2333428fae3e9533415626ec502545070d110687a22b422bbafae
Contents?: true
Size: 611 Bytes
Versions: 4
Compression:
Stored size: 611 Bytes
Contents
module Locomotive::Steam module Models class ManyToManyAssociation < ReferencedAssociation def __load__ source_key = :"#{@options[:association_name].to_s.singularize}_ids" key = @repository.k(:_id, :in) @repository.local_conditions[key] = @entity[source_key] # use order_by from options as the default one for further queries @repository.local_conditions[:order_by] = @options[:order_by] unless @options[:order_by].blank? # all the further calls (method_missing) will be delegated to @repository @repository end end end end
Version data entries
4 entries across 4 versions & 1 rubygems