1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #19700 from tancnle/trivial-shallow-nesting-depth-count

A shorter and more concise version of select..size
This commit is contained in:
Rafael Mendonça França 2015-04-08 20:08:06 -03:00
commit 8c8e9b34d5

View file

@ -1678,7 +1678,7 @@ module ActionDispatch
end end
def shallow_nesting_depth #:nodoc: def shallow_nesting_depth #:nodoc:
@nesting.select(&:shallow?).size @nesting.count(&:shallow?)
end end
def param_constraint? #:nodoc: def param_constraint? #:nodoc: