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

Add hashie rails to prevent ActiveModel ForbiddenAttributeError #192

Closed
wants to merge 1 commit into from

Conversation

smedrick
Copy link

This is an issue with grape, and it looks like it was closed without fixing:
ruby-grape/grape#404 (comment)

@shaqq
Copy link
Contributor

shaqq commented Mar 11, 2015

How are you getting that error currently? I can't seem to reproduce it.

@smedrick
Copy link
Author

I set up a new app and put together the people-service example in the Quickstart guide. When I attempt to POST json to the endpoint, it returns ActiveModel::ForbiddenAttributesError: ActiveModel::ForbiddenAttributesError on the Person.create! mass-assign call.

As soon as I included hashie_rails, it started working.

@shaqq
Copy link
Contributor

shaqq commented Mar 15, 2015

@smedrick apologies for the late response. I'm assuming your version of Grape is 0.11.0 after following the Napa instructions?

The quickest solution is probably to lock Grape at a certain version in Napa. We haven't done the best job of locking gem versions, so we have to start doing that anyway.

@smedrick
Copy link
Author

@shaqq Yeah, looks like I'm running 0.11.0. I haven't had any other glaring issues since including the hashie_rails gem, FWIW. Locking the Grape version is probably the safer solution.

@smedrick smedrick closed this Mar 16, 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