Because on: keyword does nothing with after_save method. It doesn't cause any error with Rails 5.x, but Rails 6 has more strict validation. So the meaningless on: keyword raises an error.
So this pull request replaces it with after_create to fix the error. I think it is the expected callback method.
By the way, this pull request doesn't guarantee Kuroko2 works with Rails 6 correctly.
I've confirmed this patch fixes the error, but I gave up to upgrade Rails to 6 after the confirmation. So maybe it still has other problems with Rails 6.
When I tried to use Kuroko2 on Rails 6, I got the following error.
Because
on:
keyword does nothing withafter_save
method. It doesn't cause any error with Rails 5.x, but Rails 6 has more strict validation. So the meaninglesson:
keyword raises an error.So this pull request replaces it with
after_create
to fix the error. I think it is the expected callback method.ref: https://github.com/rails/rails/issues/35329
By the way, this pull request doesn't guarantee Kuroko2 works with Rails 6 correctly. I've confirmed this patch fixes the error, but I gave up to upgrade Rails to 6 after the confirmation. So maybe it still has other problems with Rails 6.