2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-11 21:04:42 +08:00

DEV: Remove PostAction/UserAction bookmark refs (#16681)

We have not used anything related to bookmarks for PostAction
or UserAction records since 2020, bookmarks are their own thing
now. Deleting all this is just cleaning up old cruft.
This commit is contained in:
Martin Brennan 2022-05-10 10:42:18 +10:00 committed by GitHub
parent 955d47bbd0
commit fbcc35b417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 22 additions and 255 deletions

View file

@ -19,7 +19,7 @@ class PostActionCreator
).perform
end

[:like, :off_topic, :spam, :inappropriate, :bookmark].each do |action|
[:like, :off_topic, :spam, :inappropriate].each do |action|
define_method(action) do |created_by, post, silent = false|
create(created_by, post, action, silent: silent)
end
@ -285,7 +285,6 @@ private
post_action
rescue ActiveRecord::RecordNotUnique
# can happen despite being .create
# since already bookmarked
PostAction.where(where_attrs).first
end