mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use any instead of length
This commit is contained in:
@@ -1239,7 +1239,7 @@ module ActiveRecord
|
||||
if match_data
|
||||
rest = name[match_data[0].length, name.length]
|
||||
rest = rest[1, rest.length] if rest.start_with? "."
|
||||
[match_data[1], (rest.length > 0 ? rest : nil)]
|
||||
[match_data[1], (rest.any? ? rest : nil)]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user