Skip to content

Merge Staging into Main#481

Merged
mofeejegi merged 5 commits into
mainfrom
staging
Jun 7, 2026
Merged

Merge Staging into Main#481
mofeejegi merged 5 commits into
mainfrom
staging

Conversation

@mofeejegi

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 7, 2026 20:28
@mofeejegi mofeejegi merged commit 06e7974 into main Jun 7, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Introduces a “featured courses” mechanism by adding a featured_at timestamp to courses, exposing a public endpoint to fetch featured courses for the dashboard, and adding admin endpoints to feature/unfeature a course.

Changes:

  • Add featured_at column and Course.featured_courses scope ordered by most recently featured.
  • Add public GET /courses/featured endpoint to return curated courses with pagination.
  • Add admin POST/DELETE /admin/feature-course endpoints to set/unset featured_at, and tighten creator checks/messages in a few flows.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
db/schema.rb Updates schema version and adds courses.featured_at.
db/migrate/20260607175212_add_featured_at_to_courses.rb Migration introducing featured_at on courses.
config/routes.rb Adds routes for featured courses and admin feature/unfeature endpoints.
app/models/course.rb Adds featured_courses scope filtering/ordering by featured_at.
app/controllers/questions_controller.rb Changes non-creator branch to raise a forbidden error (now message-driven).
app/controllers/courses_controller.rb Adds featured_courses action and makes non-creator course creation explicitly forbidden.
app/controllers/auth_controller.rb Updates creator-login rejection message.
app/controllers/admin_controller.rb Adds feature_course / unfeature_course actions for managing featured courses.

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

Comment on lines +2 to +4
def change
add_column :courses, :featured_at, :datetime
end
end
else
# Do nothing
raise Errors::ForbiddenError.new(message: "You are not a creator. Please visit https://app.studyround.com to onboard as a creator.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants