Skip to content

Commit

Permalink
Feature: make parent category multiple values (#162)
Browse files Browse the repository at this point in the history
* make category model accept multiple parentCategories

* keep the same attribute name for parentCategory to stay backword compatible
  • Loading branch information
Bilelkihal authored Oct 9, 2024
1 parent f7ee9f1 commit 07143c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ontologies_linked_data/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ class Category < LinkedData::Models::Base
attribute :name, enforce: [:existence]
attribute :description
attribute :created, enforce: [:date_time], default: lambda { |record| DateTime.now }
attribute :parentCategory, enforce: [:category]
attribute :parentCategory, enforce: [:category, :list]
attribute :ontologies, inverse: { on: :ontology, attribute: :hasDomain }

cache_timeout 86400
end
end
end
end

0 comments on commit 07143c4

Please sign in to comment.