Module: RightsRestrictionNotes

Defined in:
backend/app/model/mixins/rights_restriction_notes.rb

Defined Under Namespace

Modules: ClassMethods, Implementation

Constant Summary collapse

RESTRICTION_NOTE_TYPES =
['accessrestrict', 'userestrict']

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
# File 'backend/app/model/mixins/rights_restriction_notes.rb', line 6

def self.included(base)
  base.extend(ClassMethods)

  base.one_to_many(:rights_restriction)
end

Instance Method Details

#update_from_json(json, opts = {}, apply_nested_records = true) ⇒ Object



13
14
15
16
17
# File 'backend/app/model/mixins/rights_restriction_notes.rb', line 13

def update_from_json(json, opts = {}, apply_nested_records = true)
  obj = super
  RightsRestrictionNotes::Implementation.process_restriction_notes(json, obj)
  obj
end