diff options
author | printercu <printercu@gmail.com> | 2018-05-03 10:03:26 +0300 |
---|---|---|
committer | Max Melentiev <melentievm@gmail.com> | 2018-05-03 12:47:36 +0300 |
commit | 2d50374be89a056f45a3d149d2861a48dc048aa8 (patch) | |
tree | d5293f8b6ef361f9ca9ce133627c8820ffd79101 /actionview | |
parent | 1007191f31d7ce8486f1f32a5d700bbac66ae242 (diff) | |
download | rails-2d50374be89a056f45a3d149d2861a48dc048aa8.tar.gz rails-2d50374be89a056f45a3d149d2861a48dc048aa8.tar.bz2 rails-2d50374be89a056f45a3d149d2861a48dc048aa8.zip |
Use usual method definition instead of extracting args from array
Follows #32612
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/digestor.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 3832293251..ffc3d42592 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -70,18 +70,11 @@ module ActionView end private - def find_template(finder, *args) - name = args.first - prefixes = args[1] || [] - partial = args[2] || false - keys = args[3] || [] - options = args[4] || {} + def find_template(finder, name, prefixes, partial, keys) finder.disable_cache do - if format = finder.rendered_format - finder.find_all(name, prefixes, partial, keys, options.merge(formats: [format])).first || finder.find_all(name, prefixes, partial, keys, options).first - else - finder.find_all(name, prefixes, partial, keys, options).first - end + format = finder.rendered_format + result = finder.find_all(name, prefixes, partial, keys, formats: [format]).first if format + result || finder.find_all(name, prefixes, partial, keys).first end end end |