about summary refs log tree commit diff
path: root/app/models/admin
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-07-07 16:25:42 -0700
committerReverite <github@reverite.sh>2019-07-07 16:25:42 -0700
commit7d99f12fd03cf2f861d0747c3bbcd4a8cf454d99 (patch)
tree7b166c33fefb4bf3cc6f6dee46f5883f7428d80a /app/models/admin
parent100bb17b1317f07c0eaa89da869f960b6cff611f (diff)
parentfce885f271f8651702d606406e21677280071e40 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/models/admin')
-rw-r--r--app/models/admin/account_action.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/admin/account_action.rb b/app/models/admin/account_action.rb
index 84c3f880d..bdbd342fb 100644
--- a/app/models/admin/account_action.rb
+++ b/app/models/admin/account_action.rb
@@ -17,10 +17,13 @@ class Admin::AccountAction
                 :type,
                 :text,
                 :report_id,
-                :warning_preset_id,
-                :send_email_notification
+                :warning_preset_id
 
-  attr_reader :warning
+  attr_reader :warning, :send_email_notification
+
+  def send_email_notification=(value)
+    @send_email_notification = ActiveModel::Type::Boolean.new.cast(value)
+  end
 
   def save!
     ApplicationRecord.transaction do