aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/railties/routes_helpers.rb
diff options
context:
space:
mode:
authorGaurish Sharma <contact@gaurishsharma.com>2015-03-28 12:08:36 +0530
committerGaurish Sharma <contact@gaurishsharma.com>2015-08-28 18:02:13 +0530
commit877e42e2321d544a50edaf23291130f131d6879d (patch)
tree9f55076f09ef54b321988ee418e6179d91766993 /actionpack/lib/abstract_controller/railties/routes_helpers.rb
parent3c6bb892715a43b0e02336277f2dd2552fa68af4 (diff)
downloadrails-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 'actionpack/lib/abstract_controller/railties/routes_helpers.rb')
0 files changed, 0 insertions, 0 deletions