Class: Bookmark

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/bookmark.rb

Instance Method Summary collapse

Instance Method Details

#default_document_typeObject



17
18
19
# File 'app/models/bookmark.rb', line 17

def default_document_type
  SolrDocument
end

#documentObject



7
8
9
# File 'app/models/bookmark.rb', line 7

def document
  document_type.new document_type.unique_key => document_id
end

#document_typeObject



11
12
13
14
15
# File 'app/models/bookmark.rb', line 11

def document_type
  value = super if defined?(super)
  value &&= value.constantize
  value || default_document_type
end