export a table data to xml file using Ruby on Rails

Hi Devi,

Try with following codes. let me know if you find any issues
def xmlfile
  @records = Company.find(:all)
  render :xml=>@records.to_xml
end

def xmlfile
  @records = Company.find(:all)
  render :partial => '/company/xmlfile', :layout => false, :content_type
=> 'application/xml'
end

Thanks
Saravanan K

Thanks for updating and it's working fine.