Question: Why in ASP.NET MVC is it when I use a:

```
return this.RedirectToAction("Index", "Page", new { pageKey = "test/ho/hum"})

```

or using the MVCContrib extension:

```
return this.RedirectToAction<PageController>(c => c.Index("test/ho/hum"))

```

formats my return URL as:  

`http://localhost:8882/?pageKey=test%2Fho%2Fhum`  

and not:  

`http://localhost:8882/test/ho/hum`

The latter is the usual way my route is accessible, the querystring'd approach functions but reveals pageKey and is not desirable. FYI I have a catch-all route setup as `{*pageKey}` pointing to Index() on PageController.

Any ideas why `RedirectToAction` would format like that?

Answer: 
So after hours of beating my head against this issue, I think I finally have a solution. It's pretty insane though, so hopefully someone else can still show me where I'm being stupid.

```
Factory.define :foo do |foo|
end

Factory.define :bar do |bar|
end

Factory.define :baz do |baz|
end

Factory.define :foo_with_baz do |foo|
  foo.after_create { |foo| Factory(:baz, :foo => foo) }
end

Factory.define :bar_baz do |bar_baz|
  bar_baz.bar {|bar| bar.association(:bar, :foo => Factory(:foo_with_baz))
  bar_baz.after_build {| bar_baz| bar_baz.baz_id = bar_baz.foo.bars.first.id }
end

```

The key issue being that there needs to be a foo in the database already you can get at through the factories alone, since you can use local variables or arbitrary ruby code in factories.rb (as far as I can tell).
The insaneness of creating factories with deeply nested associations led me to create [fixie](http://github.com/look/fixie) which lets you create test records using ActiveRecord. It runs during the `db:test:prepare` step. I use it to eliminate the need for fixtures. You can continue to use factories for easier-to-build objects.