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:
commit
8c8e9b34d5
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue