I see, works nicely, I modified it to this (just nitpicks)

```ruby
parameters = { :parent_fact => memo }
if params[:host_id]
  url = host_facts_path(parameters.merge({ :host_id => params[:host_id] }))
else
  url = fact_values_path(parameters)
end
```

basically removed () in if, put spaces in url=... and combined two lines, removed comment
could you please incorporate?