I am getting ActionView::MissingTemplate
error when using render_to_string method with partial views, below the code
bizz = render_to_string(:partial => "biz_new",:layout => false)
Even though i have explicitly specified :layout => false
, i am getting the MissingTemplate error always.
But render_to_string with normal views works fine in the same project. what could be the reason?
below the stack trace
ActionView::MissingTemplate (Missing partial businesses/biz_new with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:text, "/"], :locale=>[:en, :en]} in view paths "/home/ramesh/works/xxx/app/views", "/home/ramesh/works/xxx/vendor/plugins/asset_packager/app/views"):
Try
render_to_string("_biz_new", :formats => [:html], :layout => false, :locals => {:biz => @biz})
render_to_string needs the starting underscore and the .html extension.