to_xml :methods generating escaped XML

Howdy. Ruby Nuby here.

I have a couple of methods in one of my models:

  def program_asset     if promo?       PromoVersion.find(self[:promo_vid])     elsif feature?        play_id = self[:play_id]        my_play = Playdate.find(play_id)        my_fid = my_play[:fid]        ProductVersionFormat.find(my_fid)     else       logger.fatal "Came across a log item that was neither a promo nor a feature: " + self     end   end

  def program_asset_xml     program_asset.to_xml(:skip_instruct => true)   end

  # include the first-level associations.   alias_method :ar_to_xml, :to_xml   def to_xml(options = {})     default_methods = [:program_asset_xml]     options[:methods] = (options[:methods] ? options[:methods] + default_methods : default_methods )     ar_to_xml(options)   end

Sort of works okay, except here is a snippet of XML that gets returned to a browser or client:

...       <video_guide></video_guide>       <program_asset_xml>             &lt;promo_version&gt;             &lt;anchor_type&gt;&lt;/anchor_type&gt;             &lt;artesia_did type="integer"&gt;&lt;/artesia_did&gt; ...             &lt;video_guide&gt;N&lt;/video_guide&gt;             &lt;/promo_version&gt;       </program_asset_xml> ...

The :include-d program asset's XML gets converted into an escaped string, where the angle brackets have been replaced by &lt; and &gt; . What am I doing wrong?

Thanks very much in advance for any help, as well as any other suggestions you may have!

Bump. Why is it that I have to CGI.unescapeHTML the output in order for it to appear correct on the client side? CGI.unescapeHTML introduces a big performance hit, for some reason (and that could be another issue).