-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActiveJob Integration #663
Comments
Modifying the documentation allows for an extremely quick fix. What are your arguments for/against? |
This fix might be misleading. It works great to to silence the |
While this might be misleading, you should still be able to pass a decorated object to a background job without it blowing up. Ideally, a decorated object should behave as if it were the object it is decorating. Here's what I'm proposing:
Is anyone opposed to this solution? |
* Add note on Active Job integration for #663 * Implement GlobalID by delegating to object and add documentation. * Update readme and add missing require statement. * Actually include the module. * Create post instead of assuming it exists. * Add test for #to_global_id.
Closing this as I believe it is resolved. If someone figures out how to deserialize the record as a decorated object, feel free to open a pull request. |
Implementing `Decorator.find` improves compatibility with Global ID and allows one to use decorated objects in jobs seamlessly. Resolves drapergem#663. Improves drapergem#817.
Implementing `Decorator.find` improves compatibility with Global ID and allows one to use decorated objects in jobs seamlessly. Resolves drapergem#663. Improves drapergem#817.
Implementing `Decorator.find` improves compatibility with Global ID and allows one to use decorated objects in jobs seamlessly. Resolves drapergem#663. Improves drapergem#817.
Draper decorators do not currently implement globalid. The fix is just to call in an initializer:
As
rails
includesglobalid
by default, would we want to add this line to the repo or put it in the documentation?Without this fix, calling
UserMailer.welcome(user.decorate).deliver_later
will raiseActiveJob:: SerializationError
, due to this code.The text was updated successfully, but these errors were encountered: