-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Articles "trash" feature #2037
Articles "trash" feature #2037
Conversation
…database columns, GraphQL types and GraphQL update mutations)
…blish it when fact-check is sent to trash
… to item if the article is in the trash
… is sent to the trash
obj.destroy! | ||
obj.claim_description.destroy! if obj.is_a?(FactCheck) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to swap the lines as I prefer to destroy the object itself at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@melsawy good catch! I did that before but it had an issue because of the destroy dependency between claim and fact-check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Dr Caio
just left a small comment and it's my prefer and you can ignore it
Description
Allow articles (explainers and fact-checks) to be sent to / restored from the trash.
Steps:
trashed
attribute to database, GraphQL type and GraphQL update mutation for explainers and fact-checkstrashed
filter to articles queries, which isfalse
by defaultReference: CV2-5068.
How has this been tested?
Automated tests in order to keep 100% code coverage.
Checklist