Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Backend
/
Ruby on Rails
An order ID exists and its submitted status passes validation. What must happen before th…
from Ruby on Rails
Rails 8.1.3.1 / Ruby 4.0.6
intermediate
1 min
An order ID exists and its submitted status passes validation. What must happen before the update?
Authorize the authenticated principal against that order or use an ownership-scoped query.
Call permit! so Rails trusts every submitted field.
Return the model attributes before saving.
Move the update into an after_save callback.
Check
Ask AI about this kata
Report an error
previous kata
Spot the bug in the Rails controller
Spot the bug
A new version is available
Reload