Skip to content

added the fifa ranking to each team#143

Merged
dmbf29 merged 1 commit into
mainfrom
fifa-ranking
Jun 4, 2026
Merged

added the fifa ranking to each team#143
dmbf29 merged 1 commit into
mainfrom
fifa-ranking

Conversation

@dmbf29

@dmbf29 dmbf29 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

@dmbf29 dmbf29 requested review from caiosantosss and Copilot June 4, 2026 06:31
@dmbf29 dmbf29 self-assigned this Jun 4, 2026
@dmbf29 dmbf29 added the enhancement New feature or request label Jun 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a FIFA ranking attribute for teams, persists it in the database, and exposes it through the v1 team JSON representation. It also updates the World Cup 2026 setup rake task to seed rankings for the predefined teams and wraps the setup in a DatabaseViews.run_without_callback block to avoid excessive view refreshes during bulk creation.

Changes:

  • Add teams.ranking integer column via migration (and schema update).
  • Include ranking in the v1 team JSON partial so it’s returned wherever teams are rendered.
  • Seed team rankings in world_cup:create and run the task inside DatabaseViews.run_without_callback(then_refresh: true).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
lib/tasks/world_cup.rake Adds hardcoded FIFA rankings for seeded World Cup teams and updates team records with ranking during setup.
db/schema.rb Reflects the new ranking column on teams and bumps schema version.
db/migrate/20260604043212_add_fifa_ranking_to_teams.rb Adds the ranking integer column to the teams table.
app/views/v1/teams/_team.json.jbuilder Exposes ranking in the v1 team JSON payload.

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

@caiosantosss caiosantosss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

HELL YEA.
LGTM

@dmbf29 dmbf29 merged commit 2b4bbc3 into main Jun 4, 2026
1 check passed
@dmbf29 dmbf29 deleted the fifa-ranking branch June 4, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants