Commit Graph

8 Commits

Author SHA1 Message Date
GitLab Bot 9796aa22cd Add latest changes from gitlab-org/gitlab@master 2021-11-18 12:13:46 +00:00
GitLab Bot 09ff71d425 Add latest changes from gitlab-org/gitlab@master 2021-03-29 15:09:30 +00:00
GitLab Bot 5a80b10a84 Add latest changes from gitlab-org/gitlab@master 2021-03-27 00:09:34 +00:00
GitLab Bot 7985071975 Add latest changes from gitlab-org/gitlab@master 2020-09-21 12:09:34 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot b64a8161c9 Add latest changes from gitlab-org/gitlab@master 2020-05-29 18:08:26 +00:00
Stan Hu 2265ce34af Fix no avatar not showing in user selection box
After upgrading to Ruby 2.5.3, we switched `URI.join` in favor of
`Gitlab::Utils.append_path`. However,
ActionController::Base.helpers.image_path can return a full URL if a CDN
host is present.

Rails provides a way to generate the full URL using the asset path, but
that doesn't appear to work because `request` is nil`.

Revert to the previous behavior to handle CDNs and relative URLs.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56268
2019-01-13 08:02:02 -08:00
Yorick Peterse 21940d1edf
Support pushing of feature flags to the frontend
This adds a method to Gitlab::GonHelper called
`push_frontend_feature_flag`. This method can be used to easily expose
the state of a feature flag to Javascript code. For example, using this
method we may write the following controller code:

    before_action do
      push_frontend_feature_flag(:vim_bindings)
    end

    def index
      # ...
    end

    def edit
      # ...
    end

In Javascript we can then check the state of the flag as follows:

    if ( gon.features.vimBindings ) {
      // ...
    }

Fixes https://gitlab.com/gitlab-org/release/framework/issues/17
2018-10-11 17:06:19 +02:00