Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何设置不同的 http 状态但保持正常视图?目前我的行动中有这两行
self.status = 403 self.body = Web::Views::Login::Form.render(exposures)
但是我的问题是我得到了完全不同的页面,只是灰色的页面,中间有大矩形,HTML 文本为self.body(转义,所以我看到的是实际的源代码,而不是页面)。
self.body
那么,如何在保持常规视图处理(==显示self.body)的同时设置响应代码?
目前无法执行,请参阅https://github.com/hanami/hanami/issues/874了解解决方法。