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:
parent
c767fbfc25
commit
be137b0ac3
1 changed files with 2 additions and 1 deletions
|
@ -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\-\/]+$/
|
||||
|
|
Loading…
Reference in a new issue