Home > database >  Best place for Middlewares on Rails 6
Best place for Middlewares on Rails 6

Time:03-23

I'm currently on Rais 6 and using middlewares. I've something working but I don't like it. How should I improve it?

Currently my middlewares are here:

app/middleware/my_middleware.rb

And on config/application.rb I'm calling

require_relative '../app/middleware/my_middleware

Without require_relative it's not working. If I add them on app folder it's not working either. What am I missing?

  • Related