DEV: Remove deprecated PostAction.remove_act method (#24126)
The PostAction.remove_act class method has been deprecated and replaced by PostActionDestroyer. It was marked for removal in version 2.9.0. This PR removes the method.
This commit is contained in:
parent
545e92039c
commit
3ad8e1fbde
|
@ -136,16 +136,6 @@ class PostAction < ActiveRecord::Base
|
||||||
target_post.post_actions.each { |post_action| post_action.update_counters }
|
target_post.post_actions.each { |post_action| post_action.update_counters }
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.remove_act(user, post, post_action_type_id)
|
|
||||||
Discourse.deprecate(
|
|
||||||
"PostAction.remove_act is deprecated. Use `PostActionDestroyer` instead.",
|
|
||||||
output_in_test: true,
|
|
||||||
drop_from: "2.9.0",
|
|
||||||
)
|
|
||||||
|
|
||||||
PostActionDestroyer.new(user, post, post_action_type_id).perform
|
|
||||||
end
|
|
||||||
|
|
||||||
def remove_act!(user)
|
def remove_act!(user)
|
||||||
trash!(user)
|
trash!(user)
|
||||||
# NOTE: save is called to ensure all callbacks are called
|
# NOTE: save is called to ensure all callbacks are called
|
||||||
|
|
Loading…
Reference in New Issue