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

use presence method instead of checking for blank

This commit is contained in:
Nihad Abbasov 2012-09-14 11:47:22 +06:00
parent bb732beba7
commit 6927fadbe7

View file

@ -149,7 +149,7 @@ module ActionView
# as well as incorrectly putting part of the path in the template
# name instead of the prefix.
def normalize_name(name, prefixes) #:nodoc:
prefixes = nil if prefixes.blank?
prefixes = prefixes.presence
parts = name.to_s.split('/')
parts.shift if parts.first.empty?
name = parts.pop