Skip to content

Enable Zeitwerk #268

Closed
Closed

Description

@vangberg

Rails 7 does not ship with classic autoloading anymore, so we need to switch to Zeitwerk. Migration guide: Classic to Zeitwork HOWTO.

Right now the main blocker are the service objects in app/services. Zeitwork expects e.g. app/services/name/fuzzy_search.rb to define Name::FuzzySearch and not Services::Name::FuzzySearch. This matches the Rails default, e.g. app/controllers/page_controller.rb defines PageController and not Controllers::PageController.

My suggestion would be to skip the name folder and move both services to top-level app/services, so we have e.g. app/services/fuzzy_search.rb which defines the class FuzzySearchService. I think this makes sense given that service objects are rarely tied to a specific model, but rather act as orchestration of multiple models. This is apparent in TypeResolver which is also in app/services/name but works on multiple models (Name, Genome, Strain).

Outstanding issues

Activity

  1. added this to the v1.2 milestone on Jun 30, 2026
  2. vangberg commented on Aug 19, 2026

    @vangberg
    ContributorAuthor

    This was done with the change to 6.1 defaults in #285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions