Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve original callback execution order
This cop registers an offense when a callback appears after another callback that will be executed later in the record's lifecycle. The auto-correct logic currently always moves the offending callback to before the first callback in the class. This does eventually produce the correct result, but it's not very efficient, and can reorder callbacks of the same type, which changes the order in which they're executed. By moving the offending callback above the preceding one, the sort becomes stable and the original callback execution order is preserved.
- Loading branch information