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:
parent
bb732beba7
commit
6927fadbe7
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ module ActionView
|
||||||
# as well as incorrectly putting part of the path in the template
|
# as well as incorrectly putting part of the path in the template
|
||||||
# name instead of the prefix.
|
# name instead of the prefix.
|
||||||
def normalize_name(name, prefixes) #:nodoc:
|
def normalize_name(name, prefixes) #:nodoc:
|
||||||
prefixes = nil if prefixes.blank?
|
prefixes = prefixes.presence
|
||||||
parts = name.to_s.split('/')
|
parts = name.to_s.split('/')
|
||||||
parts.shift if parts.first.empty?
|
parts.shift if parts.first.empty?
|
||||||
name = parts.pop
|
name = parts.pop
|
||||||
|
|
Loading…
Reference in a new issue