📜  弃用警告:渲染文件:应给出文件的绝对路径 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:46.187000             🧑  作者: Mango

代码示例1
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 8f23129b4..0ce74d104 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -5,4 +5,4 @@
   <% end %>
 <% end %>

-<%= render :file => "layouts/base" %>
+<%= render :template => 'layouts/base' %>