about summary refs log tree commit diff
path: root/app/models/admin
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-07-07 13:49:31 +0200
committerThibaut Girka <thib@sitedethib.com>2019-07-07 13:49:31 +0200
commit7039dca12cf926fecbb2eb4fbba1461af5cb91c2 (patch)
treee530d7d18cd36177015c3fc840aaea68a6d723fa /app/models/admin
parent47c30be8d810fd6d5d27285a097d01843f4dd9f6 (diff)
parentc07cca4727041ea5a5721acbc603d4bfb45a15a6 (diff)
Merge commit 'c07cca4727041ea5a5721acbc603d4bfb45a15a6' into glitch-soc/merge-upstream
Unlike upstream, kept the direct timeline endpoint, as it is still of use in
glitch-soc.
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