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

refactor HTTParty::HashConversions.to_params #368

Merged
merged 1 commit into from
Jan 3, 2015
Merged

refactor HTTParty::HashConversions.to_params #368

merged 1 commit into from
Jan 3, 2015

Conversation

rusikf
Copy link

@rusikf rusikf commented Jan 2, 2015

  1. I think using dangerous chop! is unnecessary , you can use this:
def self.to_params(hash)
 params = hash.to_hash.map { |k,v| normalize_param(k,v) }.join
 params.chop
end
  1. Using params variable is not necessary, using chop in chain is more concise and used in the same way as map, join method
  2. Tests are added in previous pr Create spec for HashConversion #367

jnunemaker pushed a commit that referenced this pull request Jan 3, 2015
refactor HTTParty::HashConversions.to_params
@jnunemaker jnunemaker merged commit 357633d into jnunemaker:master Jan 3, 2015
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