MHN
Add a comment on Hacker News →
1 of 19 comments
  1. > No, you shall not do a User.where directly, you have to do a
    > UsersRepository.find_all_with_email(...).

    Even that seems weird to me. If want to load objects, I want to load them from a particular repository, not a class of repositories (which the upper-casing of `UsersRepository` suggests).

    As soon as your app needs to talk to more than one data source, this business where data is tightly coupled to a particular datasource by the framework makes a big mess.

    But that's why I don't use Rails in the first place.