Hi Ignacio; Many thanks for the suggestion, but simply calling *render* doesn't allow me to update the part contexts I need to by using the web method.
Oddly, having tested the very same web method, setup, and context on a staging box, I do *not* encounter the "missing template" issue. Bizarre! So, it appears to be an environment problem. I will keep hunting and report back. But certainly in my staging environment, the normal "hobo_ajax_response" call works as intended with no complaints. Best regards, Tim On Sat, Mar 7, 2015 at 11:07 AM, Ignacio Huerta <[email protected]> wrote: > Hi Tim, > > Have you tried replacing hobo_ajax_response() with render? > > render :js => "alert('hello')" > > Warm regards, > Ignacio > > El 06-03-2015 a las 21:54, Tim Griffin escribió: > > Hi all; > > > > (Hobo 2.0.1) > > > > I have a simple web_method defined that writes a PDF file to disk, and > > then responds with a javascript postamble: > > > > def generate_pdf > > > > # Generate the PDF here (write it to disk). > > > > # Notify user we're done. > > js = "notify(\"#{ t('caption') }\", \" #{ t('message') } \", \" > > #{icon} \");" > > hobo_ajax_response( :postamble => js ) > > > > end > > > > This is called with a POST: > > > > <form web-method="generate_pdf" method="POST"> > > <submit id="btn_GeneratePDF" label="Generate PDF"/> > > </form> > > > > While the method works and does its job, it's always raising a > > (harmless) exception: > > > > An ActionView::MissingTemplate occurred in instruments#generate_pdf: > > > > Missing template instruments/generate_pdf, application/generate_pdf > with > > {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, > > :dryml]}. Searched in: > > * "/webapps/polar/rels/20140812_00/app/views" > > * > > > "/home/sshadmin/.rvm/gems/ruby-1.9.3-p545/bundler/gems/ckeditor-dc2a09e9e911/app/views" > > * "#<Dryml::Railtie::PageTagResolver:0x0000000a89b1b0>" > > > > actionpack (3.2.21) lib/action_view/path_set.rb:58:in `find' > > > > > > Any ideas what might be missing to stop Rails looking for a template to > > render? > > > > Many thanks, > > TIm > > > > > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Hobo Users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to [email protected] > > <mailto:[email protected]>. > > To post to this group, send email to [email protected] > > <mailto:[email protected]>. > > Visit this group at http://groups.google.com/group/hobousers. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Hobo Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/hobousers/vf4oSYOycdc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/hobousers. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/d/optout.
