gitlab-org--gitlab-foss/app
Yorick Peterse 24920bc52a
Add Project.where_paths_in
This method can be used to find multiple projects for multiple paths.
For example, take this snippet:

    Project.where_paths_in(%w{gitlab-org/gitlab-ce gitlab-org/gitlab-ee})

This will return an ActiveRecord::Relation containing the GitLab CE and
GitLab EE projects.

This method takes care of matching rows both case-sensitively and
case-insensitively where needed.

Project.find_with_namespace in turn has been modified to use
Project.where_paths_in without nuking any scoping (instead it uses
reorder(nil)). This means that any default scopes (e.g. those used for
"pending_delete" stay intact).

The method Project.where_paths_in was added so the various Markdown
filters can use a single query to grab all the projects referenced in a
set of documents, something Project.find_with_namespace didn't allow.
2016-06-10 15:33:05 +02:00
..
assets Merge branch 'award-emoji-fixes' into 'master' 2016-06-09 23:21:50 +00:00
controllers Merge branch '18019-fix-wiki-linking' into 'master' 2016-06-09 08:37:27 +00:00
finders Improve Issuable.order_labels_priority 2016-06-06 11:59:49 -05:00
helpers Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into milestone-tooltip 2016-06-09 23:08:30 +03:00
mailers
models Add Project.where_paths_in 2016-06-10 15:33:05 +02:00
services Toggling a task in a description with mentions doesn't creates a Todo 2016-06-09 16:01:08 -03:00
uploaders
validators
views Merge branch 'award-emoji-fixes' into 'master' 2016-06-09 23:21:50 +00:00
workers Update repository_import_worker.rb 2016-06-02 21:48:27 -04:00