Build MVP for ID generation and admin badge management#290
Merged
stefan-burke merged 10 commits intomainfrom Oct 12, 2025
Merged
Build MVP for ID generation and admin badge management#290stefan-burke merged 10 commits intomainfrom
stefan-burke merged 10 commits intomainfrom
Conversation
- Introduce BadgeBatch and Badge models with associations - Create migrations for badges and badge_batches tables - Add BadgesController with actions for listing, showing, creating batches, and editing badges - Implement views for badge batch index, show, new batch, and badge edit - Add routes for badge batches and badges restricted to admin - Add localization strings for badges - Add admin navigation link to badges - Include comprehensive model and feature specs for badges functionality Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
- Introduce BadgeBatch model with note and count attributes - Add BadgeBatchesController to manage badge batches (index, show, new, create, edit, update) - Implement batch creation generating multiple badges with unique IDs - Add views for listing, showing, creating, and editing badge batches - Add count column to badge_batches table and migrate schema - Refactor badge ID generation to support batch generation - Update routes to include badge batch actions - Include comprehensive specs and feature tests for badge batches - Remove deprecated badge batch related code from BadgesController - Add localization strings for badge batch UI and messages Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
…scope conditions Removed scope_conditions parameter from generate_random_id and generate_random_ids methods. Adjusted uniqueness check to no longer consider external scope conditions. Updated generate_custom_id to call generate_random_id without arguments. Corresponding spec tests cleaned up to reflect these changes. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
Add comprehensive request specs for BadgeBatches and Badges controllers covering authentication, authorization, CRUD operations, and edge cases. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
- Added feature specs for badge management UI navigation and display - Simplified and consolidated badge batch request specs - Streamlined badge request specs with combined update tests - Removed redundant tests for missing badge batch and badge on edit/update - Improved readability and maintainability of badge-related test files Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
Corrected multiple I18n key usages in badge batch management feature specs to align with the current localization keys, ensuring test accuracy for new and edit batch forms. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
- Implement search action in BadgeBatchesController to find badges by ID with flash messages and redirects. - Add badge show action and view displaying badge and related batch details. - Add search form to badge batches index page. - Update routes to include badge_batches search route and badges show route. - Add I18n translations for new UI elements and messages. - Include specs for badge search and badge show features. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
…essages Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Core functionality
badge_count) to reflect how many badges it containsBackend / Controllers
Persistence
Routes
collection do
get :search, path: "search", as: :search
end
end
UI / Views
Locales
Tests
Test plan
How to run locally
Notes & potential follow-ups
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/0df353f1-aa27-4fa7-b660-6517e8b3e532