0

私はclipsControllerでこのコードを実行しています:

  def destroy
    @clip = Clip.find(params[:id])
    @clip.destroy
    respond_to do |format|
      format.html {redirect_to request.referer, notice: "Attachment deleted."}
      format.js {
        @pmdocument = @clip.attachable
        render action: "pmdocuments/show"
      }
    end
  end

これにより、pmdocumentsにあるshow.js.erbというテンプレートがレンダリングされますが、代わりに次のエラーメッセージが表示されます。

ActionView::MissingTemplate (Missing template clips/pmdocuments/show,
application/pmdocuments/show with {:locale=>[:en], :formats=>[:js, :html]
, :handlers=>[:erb, :builder, :coffee, :haml]}. Searched in:

どうしたの?

4

1 に答える 1

3

先頭を追加し/ます。現在のコントローラーに関連するアクションをレンダリングしようとしています。したがって、この -

render action: "/pmdocuments/show"
于 2012-12-11T15:40:57.440 に答える