Skip to content

Remove legacy age_range fields, add migration rake task#1356

Open
maebeale wants to merge 1 commit intomainfrom
maebeale/rm-workshop-age-ranges
Open

Remove legacy age_range fields, add migration rake task#1356
maebeale wants to merge 1 commit intomainfrom
maebeale/rm-workshop-age-ranges

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 7, 2026

Summary

  • Remove age_range / age_range_spanish from workshop display (show page, forms), strong params, decorators, model validations, and specs
  • Remove rhino_age_range_spanish rich text field from Workshop and WorkshopIdea models
  • Remove age_range from WorkshopIdea entirely (model, controller, service, specs)
  • Add data:convert_age_ranges rake task to migrate free-text age_range values into AgeRange categorizable_items
  • Rake task creates [AGE_RANGE_DATA] comments on workshops for audit trail (auto-applied and unmatched)
  • Nils column values that exactly match a category name
  • Rename "Teen" seed to "13-17"

Dependencies

  • PR 1 (prerequisite): Workshop commentable (has_many :comments) — needed before running the rake task in production

Test plan

  • Verify workshop show page no longer displays age range fields
  • Verify workshop edit form no longer has age_range/age_range_spanish inputs
  • Verify workshop idea creation no longer accepts age_range
  • Run bundle exec rspec spec/tasks/convert_age_ranges_spec.rb (21 examples, 0 failures)
  • Run rake task against staging data and verify categorizable_items and comments are created

🤖 Generated with Claude Code

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>
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.

1 participant