```ruby
module AlternateRails
  module ControllerHelpers

    def set_alternate_formats(formats)
      @alternate_formats = formats
    end
  
  end
end```

Send Content-Location headers if no extension has been provided
user
```ruby
module AlternateRails
  module ControllerHelpers

    def alternate_formats(formats)
      @alternate_formats = formats
      send_headers
    end
    
    def send_headers
      if params[:format].nil? && request.headers['action_dispatch.request.accepts']
        format = request.headers['action_dispatch.request.accepts'].first
        params[:format] = format.ref
        params[:only_path] = true
        if @alternate_formats.include? params[:format]
          headers['Content-Location'] = url_for params
        end
      end
    end
      
  end
end```
assistant