posts: clean up delete! method.
* Remove unused `ban` and `without_mod_action` options. * Don't try to set the `is_banned` flag during deletion. * Don't create modactions for automatic "unapproved in 3 days" deletions, only to delete them after the fact.
This commit is contained in:
@@ -61,7 +61,7 @@ class PostsController < ApplicationController
|
||||
|
||||
if params[:commit] == "Delete"
|
||||
move_favorites = params.dig(:post, :move_favorites).to_s.truthy?
|
||||
@post.delete!(params.dig(:post, :reason), move_favorites: move_favorites)
|
||||
@post.delete!(params.dig(:post, :reason), move_favorites: move_favorites, user: CurrentUser.user)
|
||||
flash[:notice] = "Post deleted"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user