From: Eugen Rochko Date: Sat, 6 Jul 2019 11:54:32 +0000 (+0200) Subject: Fix option to send e-mail notification about account action always being true (#11242) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=ae003d54f956fa2cbb422b04519b3a3e602652c3;p=mastodon.git Fix option to send e-mail notification about account action always being true (#11242) --- 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