summaryrefslogtreecommitdiff
path: root/app/views/layouts/_init_auto_complete.html.haml
blob: 82ec92988eb4fcfcc34828a2d1d0c26ca6d22b91 (plain)
1
2
3
4
5
6
7
8
9
10
11
- object = @target_project || @project || @group
- noteable_type = @noteable.class if @noteable.present?

- datasources = autocomplete_data_sources(object, noteable_type)

- if object
  = javascript_tag nonce: true do
    :plain
      gl = window.gl || {};
      gl.GfmAutoComplete = gl.GfmAutoComplete || {};
      gl.GfmAutoComplete.dataSources = #{datasources.to_json};