This is not needed. Sorry I didn't spot this earlier.

```ruby
format.html { render :text => distributor_report.as(:html), :type => :html }
```