Fix JobSerializer serialize? to handle all LinkedinUrlValue types#6
Conversation
- Update serialize? method to check for LinkedinUrlValue::Base instead of klass - This fixes ActiveJob::SerializationError for AsBlank and Exceptional types in Rails 8.1 - Bump version to 0.2.4 Co-Authored-By: Grant <grantspeelman@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a serialization bug in JobSerializer where only Regular LinkedinUrlValue types could be serialized, causing errors for AsBlank and Exceptional variants in Rails 8.1.
Changes:
- Updated
JobSerializer#serialize?to check againstLinkedinUrlValue::Baseinstead ofklass - Bumped gem version to 0.2.4
- Added changelog entry documenting the fix
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/linkedin_url_value/job_serializer.rb | Changed serialize? check from klass to Base class to support all LinkedinUrlValue types |
| linkedin_url_value.gemspec | Incremented version from 0.2.3 to 0.2.4 |
| CHANGELOG.md | Added entry for version 0.2.4 documenting the serialization fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updates
JobSerializer#serialize?to check forLinkedinUrlValue::Baseinstead ofklass(which returnsRegular). This fixesActiveJob::SerializationError: Unsupported argument type: LinkedinUrlValue::AsBlankerrors in Rails 8.1 by ensuring all LinkedinUrlValue types (Regular, Exceptional, AsBlank) can be serialized.Version bumped to 0.2.4
Link to Devin run: https://app.devin.ai/sessions/858cbf3a5f9748b1904847be2ad0f18d
Requested by: Grant