以前是这样的- render file: "public/404.html", status: :not_found 在更新到Rails6.1之后,它不再使用此错误- render file: shouldbe given the absolute path to a file.'public/404.html' was given instead 绝对路径的问题是没有将文件插入到我的页面properly...so中,我决定这
我使用Rails 3,并试图了解控制器中before_filter方法的行为。end例如,如果我浏览页面http://<my_web_site>/user/1 (它加载从用户填充的带有ID 1的数据的users/show.html.erb视图文件),before_filter如果我以这种方式将users/show.html.erb视图文件呈现为另一个控制器(例如: PostsController)的模板
# This code is in t