Specifying format: "xml" ignored with render_to_string Specifying format: "xml" ignored with render_to_string ruby-on-rails ruby-on-rails

Specifying format: "xml" ignored with render_to_string


This works for me.

render_to_string( :action => "#{self.action_name}", :formats => [:xml] )