Class: DiscussionNote
- Inherits:
-
Note
- Object
- ActiveRecord::Base
- ApplicationRecord
- Note
- DiscussionNote
- Defined in:
- app/models/discussion_note.rb
Overview
A note in a non-diff discussion on an issue, merge request, commit, or snippet.
A note of this type can be resolvable.
Constant Summary
Constants inherited from Note
Note::TYPES_RESTRICTED_BY_ABILITY
Constants included from ThrottledTouch
ThrottledTouch::TOUCH_INTERVAL
Constants included from Gitlab::SQL::Pattern
Gitlab::SQL::Pattern::MIN_CHARS_FOR_PARTIAL_MATCHING, Gitlab::SQL::Pattern::REGEX_QUOTED_WORD
Constants included from ResolvableNote
ResolvableNote::RESOLVABLE_TYPES
Constants included from CacheMarkdownField
CacheMarkdownField::INVALIDATED_BY
Constants included from Redactable
Redactable::UNSUBSCRIBE_PATTERN
Instance Attribute Summary
Attributes inherited from Note
#commands_changes, #redacted_note_html, #special_role, #total_reference_count, #user_visible_reference_count
Attributes included from Importable
Class Method Summary collapse
-
.noteable_types ⇒ Object
Names of all implementers of `Noteable` that support discussions.
Instance Method Summary collapse
Methods inherited from Note
#active?, #award_emoji?, #banzai_render_context, #can_be_award_emoji?, #can_be_discussion_note?, #can_create_todo?, #commit, #confidential?, #contains_emoji_only?, count_for_collection, #diff_note?, #discussion, #discussion_id, discussions, #editable?, #edited?, #emoji_awardable?, #expire_etag_cache, find_discussion, #for_alert_mangement_alert?, #for_commit?, #for_design?, #for_issuable?, #for_issue?, #for_merge_request?, #for_personal_snippet?, #for_project_noteable?, #for_snippet?, grouped_diff_discussions, #has_special_role?, has_special_role?, #hook_attrs, #in_reply_to?, #max_attachment_size, #merge_requests, model_name, #noteable, #noteable_ability_name, #noteable_assignee_or_author?, #noteable_type=, #notify_after_create, #notify_after_destroy, #parent_user, #part_of_discussion?, positions, #readable_by?, #references, #resource_parent, #retrieve_upload, search, #skip_notification?, #skip_project_check?, #specialize_for_first_contribution!, #start_of_discussion?, #supports_suggestion?, #system_note_with_references?, #system_note_with_references_visible_for?, #to_ability_name, #to_discussion, #touch, #touch_noteable, #user_mentions
Methods included from ThrottledTouch
Methods included from Editable
Methods included from ResolvableNote
#potentially_resolvable?, #resolvable?, #resolve!, #resolve_without_save, #resolved?, #to_be_resolved?, #unresolve!, #unresolve_without_save
Methods included from AfterCommitQueue
#run_after_commit, #run_after_commit_or_now
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, #parent_user, #refresh_markdown_cache, #refresh_markdown_cache!, #rendered_field_content, #skip_project_check?, #updated_cached_html_for
Methods included from FasterCacheKeys
Methods included from Awardable
#awarded_emoji?, #downvotes, #emoji_awardable?, #grouped_awards, #upvotes, #user_authored?, #user_can_award?
Methods included from Mentionable
#all_references, #create_cross_references!, #create_new_cross_references!, #directly_addressed_users, #extractors, #gfm_reference, #local_reference, #matches_cross_reference_regex?, #mentioned_users, #referenced_group_users, #referenced_groups, #referenced_mentionables, #referenced_project_users, #referenced_projects, #referenced_users, #store_mentions!
Methods included from Participable
Methods included from Gitlab::Utils::StrongMemoize
#clear_memoization, #strong_memoize, #strong_memoized?
Methods inherited from ApplicationRecord
at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order
Class Method Details
.noteable_types ⇒ Object
Names of all implementers of `Noteable` that support discussions.
11 12 13 |
# File 'app/models/discussion_note.rb', line 11 def self.noteable_types %w(MergeRequest Issue Commit Snippet) end |
Instance Method Details
#discussion_class ⇒ Object
17 18 19 |
# File 'app/models/discussion_note.rb', line 17 def discussion_class(*) Discussion end |