Files
gitlabhq/app/views/layouts/_init_auto_complete.html.haml
T
Yorick Peterse 569f5701ee Only load autocomplete data when actually needed
Previously this would result in autocomplete data being loaded for every
page (e.g. the page showing all Git branches of a project).
2016-01-11 11:13:11 +01:00

7 lines
268 B
Plaintext

- project = @target_project || @project
- if @noteable
:javascript
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: @noteable.class, type_id: params[:id])}"
GitLab.GfmAutoComplete.setup();