Forum: Ruby on Rails Writing an imgae tag in to_xml

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3d9e26d3be3e7fcf93aca6574bc77a20?d=identicon&s=25 Tushar Gandhi (gandhi-tush)
on 2009-04-28 12:07
Hi,
I am trying to create an pdf report by using ruby jasper pages. For that
I have written customer_list.rxml file like this:

xml.instruct!
xml.customer_list_result do
  xml.invoice_customers do
    @customers.each do |customer|
      xml <<
customer.to_xml(:dasherize=>false,:skip_instruct=>true,:only=>[:id,:name,:city],:root=>"customer")
    end
  end
end

I want to add an image tag into this xml data, so that image will be
displayed on the pdf.
I have customer_image field in customers table.
Can anyone help me out for this?

Thanks,
Tushar
This topic is locked and can not be replied to.