Skip to content
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

Strip leading and trailing whitespace from params.get, add get_raw. #1144

Merged
merged 1 commit into from
May 18, 2020
Merged

Strip leading and trailing whitespace from params.get, add get_raw. #1144

merged 1 commit into from
May 18, 2020

Conversation

wout
Copy link
Contributor

@wout wout commented May 17, 2020

Purpose

Implements #1141.

Description

Basically, params.get and params.get? have been renamed to params.get_raw and params.get_raw? respectively. The original methods are now wrappers for their *_raw variants, but they strip away leading and trailing whitespace.

# with: email= [email protected] &age=41
params.get(:email) # => "[email protected]"
params.get_raw(:email) # => " [email protected] "

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

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

Woo hoo! Looks great

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.

2 participants