Sha256: eb7765a9f8ec9016ae0f8ad4787dc87413e0587c23d07b4603f1965b8df18cd7
Contents?: true
Size: 455 Bytes
Versions: 74
Compression:
Stored size: 455 Bytes
Contents
# frozen_string_literal: true class Bookmark < ApplicationRecord belongs_to :user, polymorphic: true belongs_to :document, polymorphic: true validates :user_id, presence: true def document document_type.new document_type.unique_key => document_id end def document_type value = super if defined?(super) value &&= value.constantize value || default_document_type end def default_document_type SolrDocument end end
Version data entries
74 entries across 74 versions & 2 rubygems