Remove legacy age_range fields, add migration rake task#1356
Open
Remove legacy age_range fields, add migration rake task#1356
Conversation
Remove age_range/age_range_spanish from workshop display, forms, strong params, decorators, and specs. Remove rhino_age_range_spanish rich text and age_range validation. Remove age_range from workshop_idea entirely. Add data:convert_age_ranges rake task that converts free-text age_range values into AgeRange categorizable_items, with [AGE_RANGE_DATA] comments for audit trail. Nils column values that exactly match a category name. Rename "Teen" seed to "13-17". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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
age_range/age_range_spanishfrom workshop display (show page, forms), strong params, decorators, model validations, and specsrhino_age_range_spanishrich text field from Workshop and WorkshopIdea modelsdata:convert_age_rangesrake task to migrate free-text age_range values into AgeRangecategorizable_items[AGE_RANGE_DATA]comments on workshops for audit trail (auto-applied and unmatched)Dependencies
has_many :comments) — needed before running the rake task in productionTest plan
bundle exec rspec spec/tasks/convert_age_ranges_spec.rb(21 examples, 0 failures)🤖 Generated with Claude Code