Fix option to send e-mail notification about account action always being true (#11242)

This commit is contained in:
Eugen Rochko 2019-07-06 13:54:32 +02:00 committed by GitHub
parent 33607c43a5
commit ce5f0247f6

View file

@ -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