David Kahn
未讀,2010年10月27日 下午4:10:142010/10/27登入以回覆作者
登入以轉寄訊息
你的權限不足,無法在這個群組刪除訊息
登入以檢舉訊息
該群組的電子郵件地址為匿名,或你需要檢視成員電子郵件地址的權限才能查看原始貼文
收件者:rubyonra...@googlegroups.com
This is the second time I have seen this error, and been googling around and cant find an explanation. This error is happening with Rails 3/1.9.2 and was not with Rails 2.3.8/1.8.7:
Template is missing
Missing partial layouts/application with {:handlers=>[:erb, :rjs,
:builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]}
in view paths
"/Users/DK/Documents/ror/projects/creditcompare3/app/views"
This is the controller code below, and yes, I have verified that the layout application.html.erb exists. What I don't understand is why it seems that Rails is demanding that the layout be a partial. I did try changing the application layout to a partial, and then in this case the page loads without the above error. But on normal non-partial renders, then of course I loose the application template. Makes no sense to have both application.html.erb and a partial _application.html.erb but this seems to be the only way I have found to hack around this error. Is there a new syntax I should be using instead?
respond_to do |format|
format.html { render :partial => "index", :layout => "application" }
end
Thanks much,
David