We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a44cb5 commit a68b90dCopy full SHA for a68b90d
CHANGELOG.md
@@ -7,7 +7,7 @@
7
#### Fixes
8
9
* Your contribution here.
10
-
+* [#384](https://github.com/ruby-grape/grape-entity/pull/384): Fixed the `inspect` method to correctly handle nil values. - [@fcce](https://github.com/fcce).
11
12
### ### 1.0.1 (2024-04-10)
13
spec/grape_entity/entity_spec.rb
@@ -1769,6 +1769,12 @@ class NoPathCharacterEntity < Grape::Entity
1769
expect(data).to_not include '@options'
1770
expect(data).to_not include '@delegator'
1771
end
1772
+
1773
+ it 'returns a nil string when subject is nil' do
1774
+ data = subject.class.new(nil).inspect
1775
+ expect(data).to include 'nil'
1776
+ end
1777
1778
1779
1780
describe '#value_for' do
0 commit comments