Answer the question
In order to leave comments, you need to log in
Where to place the class describing the exception?
Hello. Where should exception classes be placed in Ruby on Rails? Interested in which directory / file. Is it possible to create a separate file for the code of classes describing exceptions?
Answer the question
In order to leave comments, you need to log in
There is no standard.
This is how they do it in rails, for example:
https://github.com/rails/rails/blob/master/activer...
If there are few errors, I would first add them to the initializers. If there is a lot, then I would have already added an additional directory to autoload (app/errors/) and divided it by namespaces
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question