Can't find the partial

iso .. wrote:

Here is the code:

class Admin::ContentPhotosController < ApplicationController
  ...
  def new
    respond_to do |format|
      format.js { render :partial => "admin/content_photos/form" }
    end
  end
  ...
end

format.js { render :partial => "form" }

hth

ilan

Ilan Berci wrote:

iso .. wrote:

Here is the code:

class Admin::ContentPhotosController < ApplicationController
  ...
  def new
    respond_to do |format|
      format.js { render :partial => "admin/content_photos/form" }
    end
  end
  ...
end

format.js { render :partial => "form" }

hth

ilan

Unfortunately, that doesn't seem to work either. I get the same error
message:

Hi --

David A. Black wrote:

Hi --

      format.js { render :partial => "admin/content_photos/form" }

ilan

Unfortunately, that doesn't seem to work either. I get the same error
message:

Try calling your partial _form.js.haml.

David

I didn't want to call it _form.js.haml since it is rendered on a normal
http request, but renaming it to _form.haml did the trick, which makes
perfect sense.

Thanks David.