This method has got out of hand. Can we refactor it and pull out some sensible chunks to make it more readable and understandable? It's too long with too many nested if/elses and I don't like the need for this explicit return hidden a third of the way down. I think we can be in a much happier place with something like this:

```ruby
def document_url(edition, options={})
  case edition
    when CorporateInformationPage
       build_url_for_corporate_information_page(edition)
    when SupportingPage
       build_url_for_supporting_page(edition)
    else
       # default behaviour here
    end 
end
```