mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Use ActiveModel::Attributes
in admin/status_batch_action (#35255)
This commit is contained in:
parent
e97f43399b
commit
2af17adc34
|
@ -2,6 +2,7 @@
|
|||
|
||||
class Admin::StatusBatchAction
|
||||
include ActiveModel::Model
|
||||
include ActiveModel::Attributes
|
||||
include AccountableConcern
|
||||
include Authorization
|
||||
|
||||
|
@ -9,11 +10,7 @@ class Admin::StatusBatchAction
|
|||
:status_ids, :report_id,
|
||||
:text
|
||||
|
||||
attr_reader :send_email_notification
|
||||
|
||||
def send_email_notification=(value)
|
||||
@send_email_notification = ActiveModel::Type::Boolean.new.cast(value)
|
||||
end
|
||||
attribute :send_email_notification, :boolean
|
||||
|
||||
def save!
|
||||
process_action!
|
||||
|
|
Loading…
Reference in New Issue
Block a user