diff options
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 879e8daa33..e4fd63cf0e 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -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\-\/]+$/ |