Don't save mute notes if the note is blank (#193)

This commit is contained in:
David Yip
2018-01-25 22:42:19 -06:00
parent 27f8d2c739
commit 1704e0066a
3 changed files with 17 additions and 1 deletions

View File

@@ -13,5 +13,7 @@
class Glitch::Note < ApplicationRecord
belongs_to :target, polymorphic: true
validates :note, presence: true
alias_attribute :text, :note
end