After upgrade to Rails 7, I meet the error: No method error: create_after_upload! and realize in Rails 6, the methods is already an alian of create_and_upload! and in Rails 7, only create_and_upload! remain.
So I can conclude here, when calling Rails API, alias method should always replace by it’s real anem if possible.