app/models/concerns/concept.rb
# set the broader/narrower relation up for non-top-level
set the broader/narrower relation up for non-top-level
set the broader / narrower relation up for non - top - level
def add_narrow_concept(resource, opts={})
      broad_concept_res = self.find( self.resource_broad_concept_uri ) 
      broad_concept_res.narrower = broad_concept_res.narrower << resource.uri
      broad_concept_res.save!(:transaction => opts[:transaction])
      resource.broader = self.resource_broad_concept_uri
    end
def add_narrow_concept ( resource , opts = { } ) broad_concept_res = self . find ( self . resource_broad_concept_uri ) broad_concept_res . narrower = broad_concept_res . narrower << resource . uri broad_concept_res . save! ( :transaction => opts [ :transaction ] ) resource . broader = self . resource_broad_concept_uri end
set the broader/narrower relation up for non-top-level
set the broader / narrower relation up for non - top - level
# this should always exist
resource
<not_specific>
opts
<not_specific>