Browse Source

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

pull/4/head
Eugen Rochko 4 years ago
committed by GitHub
parent
commit
ae003d54f9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      app/models/admin/account_action.rb

+ 6
- 3
app/models/admin/account_action.rb 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

Loading…
Cancel
Save