I'm using mongoid 5.1, devise, postmark for email sending, I overrided devise method as below:-
user.rb model file:-
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
end
Now, I'm getting "ActiveJob::SerializationError in Devise::RegistrationsController#create" error, How to overrided ActiveJob to remove this error, Since I'm new to rails, i'm not getting any idea on overriding source code,I would be gratefull if proper technique on monkey patching or source code overriding is mentioned. Thanks, Happy Coding.
Add include GlobalID::Identification
to any model send to mailer. deliver_later
needs an id to retrieve again the model from the database.
http://edgeguides.rubyonrails.org/active_job_basics.html#globalid