diff options
author | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-07 13:00:03 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-07 13:00:03 +0300 |
commit | 893d08c0dc6a1eba14db7694636707f30b28a7f4 (patch) | |
tree | bb96bf01db95ee65e31fdffe0e868b2c861b1de5 /app | |
parent | bfe91b692a89f7a5ee8a0b044fabf5ec397b2904 (diff) |
Simplify `contains_emoji_only?` method in `Note`
Diffstat (limited to 'app')
-rw-r--r-- | app/models/note.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 2bee19479c5..239a0f77f8e 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -372,8 +372,7 @@ class Note < ActiveRecord::Base end def contains_emoji_only? - emoji_only_pattern = /\A#{Gitlab::Markdown::EmojiFilter.emoji_pattern}\s?\Z/ - (note =~ emoji_only_pattern) ? true : false + note =~ /\A#{Gitlab::Markdown::EmojiFilter.emoji_pattern}\s?\Z/ end def award_emoji_name |