Noriyo Akita's Today I Learned

# 2024-07-15

Table of Contents

2024-07-15

Rack::Utils::SYMBOL_TO_STATUS_CODE

https://qiita.com/naokami/items/1fa3aa706fb61eb66d67

Rack::Utils::SYMBOL_TO_STATUS_CODE で Rails で使っている HTTP status code とシンボルのマッピングの一覧を取得できる
:unprocessable_content=>422 となっている
controller では :unprocessable_entity でいいのだが、RSpec だと unprocessable_content じゃないとダメだった

My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts