Commit 4e12353
Allow default exposed value to be
Using `present?` limits what can be set as `:default` and restricts
falsy values like `false`, `''`, `[]` for example.
I don't really see why not allow those (I have a use case for `false`
for example, which is to ensure a nullable boolean value is always
rendered as a boolean).
Co-authored-by: peter scholz <pscholz.le@gmail.com>false or any empty data (#371)1 parent 3393516 commit 4e12353
File tree
3 files changed
+4
-3
lines changed- lib/grape_entity/exposure
- spec/grape_entity
3 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
0 commit comments