Rails Zeitwerk snakecase

Viewed 158

When we have a directory under app/ that we want Zeitwerk to work off of, and say that naming happens to be something like

app/stuff/graphql.rb
app/stuff/graphql_error.rb

then Zeitwerk is looking for some module Stuff that has some module or class Graphql. But in my code, I am always writing my modules and classes as GraphQL to match that convention. So Zeitwerk is now throwing Zeitwerk::NameError as it tries to work with the code. I don't want to use Stuff::GraphqlError, I want to use Stuff::GraphQLError. How do I trick Zeitwerk here?

2 Answers
Related