#139 √ invalid
Jaroslaw Zabiello

Broken render() try to load *.js template instead of *.js.erb

Reported by Jaroslaw Zabiello | February 19th, 2008 @ 03:47 PM

The following code raises exception: "No template found at /pathto/myproject/app/views/customer/included_template.js". It tries to find *.js file instead of *.js.haml or *.js.erb! :(

class Customer < Application
  provides :js

  def activations  
    # ...
    if request.ajax?
      @tmpl = escape_js(render(:included_template, :layout => :none))
      #  It is a hack because render() has no option for rendering templates
      #  without layout.  :none means views/layouts/none.html.haml with
      # content:  = catch_content :for_layout
    end
    render
  end
end

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »