mirror of https://github.com/rails/rails
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:
commit
8c8e9b34d5
|
@ -1678,7 +1678,7 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
def shallow_nesting_depth #:nodoc:
|
||||
@nesting.select(&:shallow?).size
|
||||
@nesting.count(&:shallow?)
|
||||
end
|
||||
|
||||
def param_constraint? #:nodoc:
|
||||
|
|
Loading…
Reference in New Issue