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 :without_protection in Rails 4 + protected_attributes gem #13

Closed
wants to merge 1 commit into from

Conversation

malmckay
Copy link

Hi,
This change checks the arity of assign_attributes, rather than the Rails version.

In Rails 3 assign_attributes takes 1 param plus 1 optional param.
In Rails 4 assign_attributes takes 1 param plus 1 optional param, if the 'rails/protected_attributes' gem is loaded.

@pothoven
Copy link
Owner

Thanks for the fix!
I apologize for the delay in response, I didn't see the notification about this pull request. I've since gotten an alternate fix for this same problem (#14) so I need to evaluate which to include. Any thoughts in comparison?

@malmckay
Copy link
Author

No worries for the delay.

I do like the simplicity of this change (#13). I haven't though through the other changes in #14, so I can't really comment on those :-)

@pothoven
Copy link
Owner

I agree, yours is a nice simple 1 line change that fixes the problem. On the other hand, the other fix may make the overall code a little simpler. Thanks for the feedback!

@pothoven
Copy link
Owner

I opted to go with PR #14 as it simplified the code overall, but I do appreciate the elegance of your fix and appreciate your contribution!

@pothoven pothoven closed this Jul 15, 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
2 participants