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

no reason to make a Mapper object if the path is blank

This commit is contained in:
Aaron Patterson 2014-05-29 16:08:56 -07:00
parent c767fbfc25
commit be137b0ac3

View file

@ -91,7 +91,6 @@ module ActionDispatch
private
def normalize_path!(path, format)
raise ArgumentError, "path is required" if path.blank?
path = Mapper.normalize_path(path)
if format == true
@ -1500,6 +1499,8 @@ module ActionDispatch
def add_route(action, options) # :nodoc:
path = path_for_action(action, options.delete(:path))
raise ArgumentError, "path is required" if path.blank?
action = action.to_s.dup
if action =~ /^[\w\-\/]+$/