Skip to content

Update inspect method to handle nil serializable_hash #384

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

Merged
merged 8 commits into from
May 24, 2025

Conversation

fcce
Copy link
Contributor

@fcce fcce commented Apr 28, 2024

serializable_hash may return nil

before

Entities::User.represent nil
# An error occurred when inspecting the object: #<NoMethodError: undefined method `map' for nil:NilClass>

after

Entities::User.represent nil
#<Entities::User:326200 nil>

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test and update CHANGELOG please?

@fcce fcce force-pushed the ce/serializable_hash_nil branch from 5be9bba to a68b90d Compare May 6, 2024 06:56
@fcce fcce requested a review from dblock May 6, 2024 07:56
@dblock
Copy link
Member

dblock commented May 18, 2025

@numbata or @fcce want to finish this one?

@bogdan bogdan mentioned this pull request May 23, 2025
@dblock dblock merged commit 489f9b9 into ruby-grape:master May 24, 2025
6 checks passed
@dblock
Copy link
Member

dblock commented May 24, 2025

Merged this, thanks for your help @numbata!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants