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
-

Justin Jones February 23rd, 2008 @ 04:00 AM
I believe you pass :layout => false to render without a layout.
-
Yehuda Katz (wycats) February 26th, 2008 @ 05:12 AM
- → State changed from new to invalid
Justin is correct. We use :layout => false, not :layout => none
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 »
