rails-upgrade-4-to-5
Installation
SKILL.md
Rails 4 → 5 Upgrade
Rails 4.2 → 5.0 is one of the biggest API breaks in the past decade.
paramsstop being a Hash. Strong parameters become mandatory. ApplicationRecord arrives. Treat as a multi-month project for a non-trivial app.
The opinion
Dual-boot with
next_rails. Hop 4.2 → 5.0 → 5.1 → 5.2. Ruby 2.2.2+ required for the whole 5.0–5.2 series (Rails' own gemspec never raised the floor within Rails 5). Budget weeks-to-months for a non-trivial app.
The hop sequence
4.2 → 5.0 → 5.1 → 5.2
Core patterns
Pattern 1: 4.2 → 5.0 — the breaking changes
Required code changes: