Class: ActiveAdmin::Annotations::Review

Inherits:
ApplicationRecord show all
Defined in:
app/models/active_admin/annotations/review.rb

Constant Summary collapse

REVIEW_STATUSES =
%w[pending reviewed escalated].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ransackable_associations(_auth_object = nil) ⇒ Object



51
52
53
# File 'app/models/active_admin/annotations/review.rb', line 51

def self.ransackable_associations(_auth_object = nil)
  %w[reviewer subject annotations]
end

.ransackable_attributes(_auth_object = nil) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'app/models/active_admin/annotations/review.rb', line 40

def self.ransackable_attributes(_auth_object = nil)
  %w[
    subject_type
    subject_id
    reviewer_id
    review_status
    context_digest
    created_at
  ]
end

Instance Method Details

#context_stale?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'app/models/active_admin/annotations/review.rb', line 36

def context_stale?
  ActiveModel::Type::Boolean.new.cast(.to_h["context_stale"])
end

#needs_follow_up?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/models/active_admin/annotations/review.rb', line 32

def needs_follow_up?
  ActiveModel::Type::Boolean.new.cast(.to_h["needs_follow_up"])
end