[openstreetmap-website] Allow reporting of abusive users to moderators or admins (#841)
notifications at github.com
Thu Nov 20 20:18:53 UTC 2014
Well the table will need to reference the reported objects. I envisage a `user_reports` tables with columns along the lines of:
Where `user_id` is the ID of the reported user, `object _type` and `object_id` form a polymorphic reference to the reported object (eg `DiaryEntry` and `23` or `DiaryComment` and `456`) and `reporter_id` is the ID of the user making a report.
There would need to be an index on `user_id` so we could find all reports for a user, and a unique index on `reporter_id+object_type+object_id` to make sure users can't report the same object twice.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev