Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/templates_controller.rb')
-rw-r--r--app/controllers/projects/templates_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/projects/templates_controller.rb b/app/controllers/projects/templates_controller.rb
index f4726638777..ab05c9694fd 100644
--- a/app/controllers/projects/templates_controller.rb
+++ b/app/controllers/projects/templates_controller.rb
@@ -24,10 +24,8 @@ class Projects::TemplatesController < Projects::ApplicationController
end
def names
- templates = @template_type.dropdown_names(project)
-
respond_to do |format|
- format.json { render json: templates }
+ format.json { render json: TemplateFinder.all_template_names_array(project, params[:template_type].to_s.pluralize) }
end
end