mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
avoid method call to compact
This commit is contained in:
@@ -171,13 +171,13 @@ module ActionDispatch
|
||||
end
|
||||
|
||||
def blocks
|
||||
block = @scope[:blocks] || []
|
||||
|
||||
if @options[:constraints].present? && !@options[:constraints].is_a?(Hash)
|
||||
block = @options[:constraints]
|
||||
else
|
||||
block = nil
|
||||
block << @options[:constraints]
|
||||
end
|
||||
|
||||
((@scope[:blocks] || []) + [ block ]).compact
|
||||
block
|
||||
end
|
||||
|
||||
def constraints
|
||||
|
||||
Reference in New Issue
Block a user