f1d3ea63cf
The status is shown for - The author of a commit when viewing a commit - Notes on a commit (regular/diff) - The user that triggered a pipeline when viewing a pipeline - The author of a merge request when viewing a merge request - The author of notes on a merge request (regular/diff) - The author of an issue when viewing an issue - The author of notes on an issue - The author of a snippet when viewing a snippet - The author of notes on a snippet - A user's profile page - The list of members of a group/user
17 lines
414 B
Ruby
17 lines
414 B
Ruby
# frozen_string_literal: true
|
|
|
|
class UserStatus < ActiveRecord::Base
|
|
include CacheMarkdownField
|
|
|
|
self.primary_key = :user_id
|
|
|
|
DEFAULT_EMOJI = 'speech_balloon'.freeze
|
|
|
|
belongs_to :user
|
|
|
|
validates :user, presence: true
|
|
validates :emoji, inclusion: { in: Gitlab::Emoji.emojis_names }
|
|
validates :message, length: { maximum: 100 }, allow_blank: true
|
|
|
|
cache_markdown_field :message, pipeline: :emoji
|
|
end
|