Moving Katello to Rails 5.2
Making Katello Rails 5.2 ready (and Rails 5.1 compatible).
- Fixes #24676 - Rails 5.2 compatibility
Since rails 5.2, _before_last_save and _was exists on different stages
of callback cycles the _was exists on "before_save", and
"_before_last_save" "after_save" here the following method is called
on both callback hooks, so it is validating both cases.
Additional important thing to know, is that "_was" changes it's value
after "save" was called, and it is pointing to the current value of
that field, so just using the "_was" will trigger it's own issues.
- Remove unused methods in callbacks
- Make method changes backward compatible with 5.1