Wes Gamble
2008-Oct-20 23:06 UTC
Taking advantage of template generation from within a model?
All, I have a controller action/view pair that successfully generates a PDF using Prawnto. I like the idea of the view specifying the details of the PDF generation in a view file (x.pdf.prawn). However, I would like to be able to generate a PDF and instead of rendering it to a view, just generate it and save it to a file. I''m doing this inside of a model method. Obviously, I can pull the PDF generation into a module and call it from both places, but I was wondering if there''s any clean way to take advantage of the template that I already have without going through too many gyrations. Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---