Sha256: 1ac77fd8881db4870081812ba959263c29ffc50486d00bf90af6deb1110ec41e

Contents?: true

Size: 193 Bytes

Versions: 3

Compression:

Stored size: 193 Bytes

Contents

module Ddr
  module HasChildren
    extend ActiveSupport::Concern

    def children
      Ddr.query_service.find_inverse_references_by(resource: self, property: 'parent_id')
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ddr-core-0.3.0 app/models/concerns/ddr/has_children.rb
ddr-core-0.2.2 app/models/concerns/ddr/has_children.rb
ddr-core-0.2.1 app/models/concerns/ddr/has_children.rb