For Rails applications that do not contain an ActiveJob, "uninitialized constant Ahoy::ActiveJob" error will occur. To avoid this error, I have added small code to check if an ActiveJob is already defined before defining an Ahoy::GeocodeV2Job.
Such a Rails application can be created by adding the minimal option to the rails new command (rails new --minimal).
I think this code is not smart. I have no problem if you close this PR and you add your better code. Also, I have already made this modification to my application, so if you think this PR is unnecessary or not for everyone, then feel free to close this PR.
Hi @ts-3156, thanks for reporting and the PR! Changed the job to autoload, which should fix it (however, I wouldn't recommend using master at the moment since it's in flux for Ahoy 5).
Hi,
Thank you for this useful gem.
For Rails applications that do not contain an ActiveJob, "uninitialized constant Ahoy::ActiveJob" error will occur. To avoid this error, I have added small code to check if an ActiveJob is already defined before defining an Ahoy::GeocodeV2Job.
Such a Rails application can be created by adding the minimal option to the rails new command (rails new --minimal).
I think this code is not smart. I have no problem if you close this PR and you add your better code. Also, I have already made this modification to my application, so if you think this PR is unnecessary or not for everyone, then feel free to close this PR.