Don't use name prefix by itself unless as is an empty string

This commit is contained in:
Joshua Peek
2009-12-08 15:50:44 -06:00
parent 3d91d7f0a2
commit 33658ea1ae

View File

@@ -228,7 +228,7 @@ module ActionDispatch
if @scope[:name_prefix] && !options[:as].blank?
options[:as] = "#{@scope[:name_prefix]}_#{options[:as]}"
elsif @scope[:name_prefix] && options[:as].blank?
elsif @scope[:name_prefix] && options[:as] == ""
options[:as] = @scope[:name_prefix].to_s
end