diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user_status.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/user_status.rb b/app/models/user_status.rb new file mode 100644 index 00000000000..df65d89b03c --- /dev/null +++ b/app/models/user_status.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class UserStatus < ActiveRecord::Base + include CacheMarkdownField + + 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: :single_line +end |