1

E.g. :ok over 200 (or viceversa) for HTTP responses.

Advantages and disadvantages, pros and cons, etc. of using symbols instead of codes (or viceversa) are welcome.

3
  • 2
    Do you remember every status code by heart? Is it nicer to read 407 or proxy_authentication_required? In any case it’s an opinion thing Commented Apr 27, 2023 at 4:34
  • 1
    @SamiKuhmonen I think that's not enough to justify the use of symbols. There must be something more... Commented Apr 27, 2023 at 4:36
  • 1
    This question seems like it will lead to an opinion-based solution. The documentation mentions that Rails understands both numeric status codes and the written symbols, but does not address a preference. Commented Apr 27, 2023 at 5:04

1 Answer 1

1

Since Ruby follows convention of Human Readable Code

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.