Class: AbuseReport

Inherits:
ApplicationRecord show all
Includes:
CacheMarkdownField, Sortable
Defined in:
app/models/abuse_report.rb

Constant Summary

Constants included from CacheMarkdownField

CacheMarkdownField::INVALIDATED_BY

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Method Summary collapse

Methods included from CacheMarkdownField

#attribute_invalidated?, #banzai_render_context, #cached_html_for, #cached_html_up_to_date?, #can_cache_field?, #invalidated_markdown_cache?, #latest_cached_markdown_version, #local_version, #mentionable_attributes_changed?, #parent_user, #refresh_markdown_cache, #refresh_markdown_cache!, #rendered_field_content, #skip_project_check?, #store_mentions!, #updated_cached_html_for

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#notifyObject


27
28
29
30
31
# File 'app/models/abuse_report.rb', line 27

def notify
  return unless self.persisted?

  AbuseReportMailer.notify(self.id).deliver_later
end

#remove_user(deleted_by:) ⇒ Object


23
24
25
# File 'app/models/abuse_report.rb', line 23

def remove_user(deleted_by:)
  user.delete_async(deleted_by: deleted_by, params: { hard_delete: true })
end