diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-12-29 10:40:47 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-12-29 10:40:47 -0500 |
commit | 0713265fd15f5ce0d6e86e620a2de254ff291f81 (patch) | |
tree | dfd008a1de576b048fc2a207400f7062ef409349 /railties/lib/rails/generators/active_model.rb | |
parent | 415e17d0b54681545d36a0f43d4cd8761de77bee (diff) | |
download | rails-0713265fd15f5ce0d6e86e620a2de254ff291f81.tar.gz rails-0713265fd15f5ce0d6e86e620a2de254ff291f81.tar.bz2 rails-0713265fd15f5ce0d6e86e620a2de254ff291f81.zip |
Use `next` instead of `break`; avoid terminating whole loop
We want to avoid terminating the whole loop here, because it will cause
parameters that should be removed to not be removed, since we are
terminating early. In this specific case, `param2` is processed before
`param1` due to the reversing of `route.parts`, and since `param2` fails
the check on this line, it would previously cause the whole loop to
fail, and `param1` would still be in `parameterized_parts`. Now, we are
simply calling `next`, which is the intended behavior.
Introduced by 8ca8a2d773b942c4ea76baabe2df502a339d05b1.
Fixes #27454.
Diffstat (limited to 'railties/lib/rails/generators/active_model.rb')
0 files changed, 0 insertions, 0 deletions