yada

Andy Dwelly 2020-05-28T11:58:11.088600Z

Generating a status 301?

Andy Dwelly 2020-05-28T12:02:58.093500Z

I'm modelling a resource that may or may not exist, when it does exist it is html, but occasionally it's moved. I can handle the existence question using the :exists? property, and I can at the same time find if the underlying data has moved and add that information as a namespaced key in the context that the get response function ends up with. Just generating html is perfectly simple, but I'm not clear on the idiomatic approach to generating either html or a 301 status with a new location. Has anyone ever done this?

dominicm 2020-05-28T14:01:24.094100Z

If you return a url that will generate a 301

dominicm 2020-05-28T14:01:38.094600Z

You can also merge into the response key in the ctx

Andy Dwelly 2020-05-29T15:33:49.100100Z

Thanks, I'll give that a try.