Setting http status but keep normal view?

84 Views Asked by At

How can I set different http status but keep normal view? Currently I have these two lines in my action

self.status = 403
self.body = Web::Views::Login::Form.render(exposures)

However my problems is that I get complete different page, just gray page with big rectangle in the middle with with HTML text of self.body (escaped, so I see the actual source code, not the page).

So, how can I set reponse code while keeping regular view processing (== displaying self.body)?

1

There are 1 best solutions below

0
On BEST ANSWER

Not possible to do at the moment, see https://github.com/hanami/hanami/issues/874 for workaround.