Rails class loading skips namespaced class when another class of same name in root namespace is loaded
I have two namespaces, each with its own controller and presenter classes: Member::DocumentsController Member::DocumentPresenter Guest::DocumentsController Guest::DocumentPresenter Both presenters inherit from ::DocumentPresenter . Controllers access their respective presenters without namespace specified, e.g.: class Guest::DocumentsController < ActionController::Base def show DocumentPresenter.new(find_document) end end This usually calls presenter within same namespace. However sometimes in development environment I see base ::DocumentPresenter is being used. I suspect the cause is that