diff options
author | Gaurish Sharma <contact@gaurishsharma.com> | 2015-03-28 12:08:36 +0530 |
---|---|---|
committer | Gaurish Sharma <contact@gaurishsharma.com> | 2015-08-28 18:02:13 +0530 |
commit | 877e42e2321d544a50edaf23291130f131d6879d (patch) | |
tree | 9f55076f09ef54b321988ee418e6179d91766993 /actionview/test/template/html_test.rb | |
parent | 3c6bb892715a43b0e02336277f2dd2552fa68af4 (diff) | |
download | rails-877e42e2321d544a50edaf23291130f131d6879d.tar.gz rails-877e42e2321d544a50edaf23291130f131d6879d.tar.bz2 rails-877e42e2321d544a50edaf23291130f131d6879d.zip |
[Feature] params.require requires array of params
This PR adds ability to accept arrays which allows you to require multiple values in one method. so instead of this:
```ruby
params.require(:person).require(:first_name)
params.require(:person).require(:last_name)
```
Here it will be one line for each params, so say if I require 10params, it will be 10lines of repeated code which is not dry. So I have added new method which does this in one line:
```ruby
params.require(:person).require([:first_name, :last_name])
```
Comments welcome
Diffstat (limited to 'actionview/test/template/html_test.rb')
0 files changed, 0 insertions, 0 deletions