Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move options_constraints tests next to each other

  • Loading branch information...
commit 522038aa9dc7d9759520d63b1c9d13086bdb3a21 1 parent 5029c37
@tenderlove tenderlove authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_dispatch/routing/mapper.rb
View
4 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -81,8 +81,6 @@ def initialize(scope, path, options)
via = Array(options.delete(:via) { [] })
options_constraints = options.delete :constraints
- @blocks = blocks(options_constraints, scope[:blocks])
-
path = normalize_path! path, formatted
ast = path_ast path
path_params = path_params ast
@@ -95,6 +93,8 @@ def initialize(scope, path, options)
split_constraints path_params, constraints
+ @blocks = blocks(options_constraints, scope[:blocks])
+
if options_constraints.is_a?(Hash)
split_constraints path_params, options_constraints
options_constraints.each do |key, default|
Please sign in to comment.
Something went wrong with that request. Please try again.