Skip to content

Conversation

@jonhyman
Copy link

Updating params such that the symbol version returned recursively uses symbols as hash keys.

That is, passing:
/url?location[city]=Dallas&location[state]=TX

will be available in the params hash as both

  • params[:location][:city] and params[:location][:state]
  • params['location']['city'] and params['location']['state']

…s symbols as hash keys.

That is, passing:
/url?location[city]=Dallas&location[state]=TX

will be available in the params hash as both
* params[:location][:city] and params[:location][:state]
* params['location']['city'] and params['location']['state']
@dblock
Copy link
Member

dblock commented Aug 31, 2011

I want to merge this fix, but maybe a cleaner implementation could be to use hashie (https://github.com/intridea/hashie) that seems to abstract this problem away? There're was another pull that tries to do that that has it's own issues. Thoughts?

@jonhyman
Copy link
Author

I'm not opposed to looking into this more. I haven't used Hashie but the extensions seem reasonable. Are you guys close to publishing Hashie 2.0? As far as I can tell it's unpublished so I can't add a runtime dependency in the gemspec.

@dblock
Copy link
Member

dblock commented Sep 1, 2011

@mbleigh can probably comment on Hashie - 1.1 doesn't do what you need I suppose

@mbleigh mbleigh closed this in 16cbc3c Sep 2, 2011
dblock pushed a commit to dblock/grape that referenced this pull request Dec 5, 2011
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