Skip to content
This repository has been archived by the owner on Aug 17, 2017. It is now read-only.

Add use-case to use an array as required parameter #194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

antonioparisi
Copy link

Required parameters

  • Add possibility to use in a require an array of parameters

Usage

If you want to make sure only certain parameters have to be required you can do:

params.require([:foo, :bar])

Conclusion

Hope this could help someone as me,
thank you

* Add possibility to give in input an array of paramaters as a `require`
@rafaelfranca
Copy link
Member

Thank you for the pull request. Could you send it to rails/rails? This
project is only for rails 3 compatibility.

Sent using mobile Gmail
On Mar 19, 2014 7:19 AM, "Antonio Parisi" [email protected] wrote:

Required parameters

  • Add possibility to use in a require an array of parameters

Usage

If you want to make sure only certain parameters have to be required you
can do:

params.require([:foo, :bar])

Conclusion

Hope this could help someone as me,

thank you

You can merge this Pull Request by running

git pull https://github.com/antonioparisi/strong_parameters feature/require-parameters-as-array

Or view, comment on, or merge it at:

#194
Commit Summary

  • require improvements

File Changes

Patch Links:

Reply to this email directly or view it on GitHubhttps://github.com//pull/194
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants