File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
actionpack/lib/action_dispatch/routing Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ def self.create(route, options)
155
155
end
156
156
157
157
def self . optimize_helper? ( route )
158
- !route . glob? && route . requirements . except ( :controller , :action ) . empty?
158
+ !route . glob? && route . requirements . except ( :controller , :action , :host ) . empty?
159
159
end
160
160
161
161
class OptimizedUrlHelper < UrlHelper # :nodoc:
@@ -171,7 +171,7 @@ def initialize(route, options)
171
171
172
172
def call ( t , args )
173
173
if args . size == arg_size && !args . last . is_a? ( Hash ) && optimize_routes_generation? ( t )
174
- options = @options . merge t . url_options
174
+ options = t . url_options . merge @options
175
175
options [ :path ] = optimized_helper ( args )
176
176
ActionDispatch ::Http ::URL . url_for ( options )
177
177
else
You can’t perform that action at this time.
0 commit comments