Repository navigation
Feedback System
Part of Communication-and-Engagement.
Model: app/models/feedback.rb · Controller: app/controllers/feedbacks_controller.rb
Structurally Feedback is Contact-System's twin — same archive/restore/keep/unkeep/convert_to_issue/reply-via-Message shape, same routing-with-fallback pattern, same identifier scheme. The practical difference is intent: Feedback is general site feedback/bug reports/handbook comments rather than a specific "I have a question about this record" contact.
title, body (validation requires at least one, not both — title_or_body_exist), feedback_type, name, email_address, user_id, plus the same archive/keep/identifier/GitHub-sync/diagnostics field groups as Contact.
-
add_email(before_create) looks up the submitter'sUseridDetailbyuser_idand can silently override the form'sname/email_addresswith the logged-in user's profile data. - FreeCEN handbook feedback (
feedback_type == 'freecen handbook feedback') is a special case: it skips the normal role-routing and goes straight to a hardcoded userid ('GeoffJ') viahandbook_feedback_communication. -
self.github_issue_status_closedis a class method (rake/cron-invoked) that polls GitHub for feedback with an open issue and notifies + flags when it closes. -
member_can_reply?gates who can reply, checked againstReplyUseridRole::FEEDBACK_REPLY_ROLE.
resources :feedbacks plus the same shape of custom routes as Contact (list_by_userid, list_by_name, list_by_date, list_by_most_recent, list_by_identifier — routed but no matching controller action, likely dead — list_archived, select_by_identifier, convert_to_issue, userid_feedbacks, userid_feedbacks_with_replies, reply_feedback, feedback_reply_messages, keep/unkeep/archive/restore/force_destroy, new_handbook_feedback).
© 2025 FreeUKGen. Licensed under Apache License 2.0