I need to show an image inside the layout of my pdf from url action non from path of an existent image. In others view (view.html.erb) this tag works perfect <%= image_tag(url_for({:controller => 'users', :action =>'gruff'})) %>
but inside of layout pdf.html.erb or show.pdf.erb doesn't work. ¿How can i put the image from a controller action? (i used <%= wicked_pdf_image_tag ....%>
instead of just <%= image_tag...%>
Controller
def gruff
g = Gruff::Pie.new
g.title = "Visual Pie Graph Test"
g.data 'Fries', 20
g.data 'Hamburgers', 50
send_data(g.to_blob,
:disposition => 'inline',
:type => 'image/png',
:filename => "hits.png")
end
Thanks!