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

Making Hashie class configurable #1580

Closed
milgner opened this issue Feb 20, 2017 · 3 comments
Closed

Making Hashie class configurable #1580

milgner opened this issue Feb 20, 2017 · 3 comments

Comments

@milgner
Copy link
Contributor

milgner commented Feb 20, 2017

Grape currently hard-codes the use of Hashie::Mash. However this can lead to problems with certain parameter names. Sometimes though this is the preferred behaviour. To make use of Hashies built-in disable_warnings functionality, it would be great if the base class would be configurable.

One could even think about making Hashie completely optional and returning a regular Hash, seeing as how one also needs the hashie-forbidden_attributes gem when in a fairly up-to-date Rails environment. A lot of overhead just for the simple syntactical advantage of being able to write params.foo instead of params[:foo], imho.

@dblock
Copy link
Member

dblock commented Feb 20, 2017

This has been discussed in #1514 and #1448. I think you summarize the work well, so I'll leave this open as a top level issue.

Would definitely take a PR in those lines!

@dblock
Copy link
Member

dblock commented Feb 25, 2017

You might want to read http://code.dblock.org/2017/02/24/the-demonic-possession-of-hashie-mash.html.

@dblock
Copy link
Member

dblock commented Apr 14, 2017

Closing via #1610. Please give HEAD a try.

@dblock dblock closed this as completed Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants