Skip to content

Allow default exposed value to be false or any empty data #371

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 2 commits into from
Feb 16, 2023
Merged

Allow default exposed value to be false or any empty data #371

merged 2 commits into from
Feb 16, 2023

Conversation

norydev
Copy link
Contributor

@norydev norydev commented Nov 29, 2022

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).

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).
@LeFnord
Copy link
Member

LeFnord commented Feb 16, 2023

ok makes sense … thanks @norydev

@LeFnord LeFnord merged commit 4e12353 into ruby-grape:master Feb 16, 2023
@norydev norydev deleted the allow-default-to-be-false branch February 18, 2023 15:32
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