Skip to content

Conversation

@loiswells97
Copy link
Contributor

@loiswells97 loiswells97 commented Oct 22, 2025

Status

What's changed?

  • Added index route for project feedback

@cla-bot cla-bot bot added the cla-signed label Oct 22, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds functionality to list feedback on a project by introducing an index route for project feedback. The change enables teachers and students to retrieve all feedback associated with a specific project.

  • Added index action to the feedback controller with authorization checks
  • Updated routes to support both index and create actions for feedback resources
  • Added comprehensive test coverage for listing feedback with different user roles

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
config/routes.rb Changed feedback from singular resource to plural resources to support index action
app/controllers/api/feedback_controller.rb Added index action to retrieve and authorize feedback for a project
app/views/api/feedback/index.json.jbuilder Created view template to render feedback list as JSON
app/models/ability.rb Updated authorization rules to allow reading feedback for teachers and students
spec/models/ability_spec.rb Added test cases verifying read permissions for feedback
spec/features/feedback/listing_feedback_spec.rb Added comprehensive integration tests for listing feedback endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@danhalson danhalson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added a couple of things, I think the copilot suggestions are also worth looking at, I commented on one, but also the one about redundant authorization just in case of n+1s

Copy link
Contributor

@danhalson danhalson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@loiswells97 loiswells97 merged commit d2ebba4 into main Oct 30, 2025
3 checks passed
@loiswells97 loiswells97 deleted the index-feedback branch October 30, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants