rails_admin

https://github.com/railsadminteam/rails_admin

Ruby

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data

Gitlab::GroupHierarchy#all_groups

Returns a relation that includes the base groups, their ancestors,
and the descendants of the base groups.

The resulting query will roughly look like the following:

    WITH RECURSIVE ancestors AS ( ... ),
      descendants AS ( ... )
    SELECT *
    FROM (
      SELECT *
      FROM ancestors namespaces

      UNION

      SELECT *
      FROM descendants namespaces
    ) groups;

Using this approach allows us to further add criteria to the relation with
Rails thinking it's selecting data the usual way.

If nested groups are not supported, ancestors_base is returned.

Source | Google | Stack overflow

Edit

git clone [email protected]:railsadminteam/rails_admin.git

cd rails_admin

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Gitlab--GroupHierarchy-all_groups-for-pr


# Commit to git

git add git commit -m "better docs for Gitlab::GroupHierarchy#all_groups"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Gitlab--GroupHierarchy-all_groups-for-pr

hub pull-request


# Celebrate!