Sha256: 55769b3f7b8223d1824975154ebd65f82654ef65bc06779d8ec343c1605523cc
Contents?: true
Size: 472 Bytes
Versions: 34
Compression:
Stored size: 472 Bytes
Contents
module Ddr module Models module HasChildren def first_child child_class = self.class.reflect_on_association(:children).klass if has_struct_metadata? child_class.find(structure.default_struct_map_ids.first) else solr_field = child_class.reflect_on_association(:parent).solr_key child_class.where(solr_field => id).order("#{Ddr::Index::Fields::LOCAL_ID} ASC").first end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems