diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-17 08:37:19 +0200 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-06-20 14:48:28 -0500 |
commit | bbfd62bc34061089f753e4170912be64bae16f84 (patch) | |
tree | 3ed2d54d4afc4449933d97ce3c992a2682a0d3e7 /lib/api/templates.rb | |
parent | a18df1d15af68be4d129412ad2a6145277ca43d3 (diff) | |
download | gitlab-ce-bbfd62bc34061089f753e4170912be64bae16f84.tar.gz |
fixup! override content method
Diffstat (limited to 'lib/api/templates.rb')
-rw-r--r-- | lib/api/templates.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/api/templates.rb b/lib/api/templates.rb index 33cbb0c9e1b..18408797756 100644 --- a/lib/api/templates.rb +++ b/lib/api/templates.rb @@ -27,11 +27,7 @@ module API required_attributes! [:name] new_template = klass.find(params[:name]) - not_found!("#{template.to_s.singularize}") unless new_template - - if new_template.class == Gitlab::Template::GitlabCiYml - new_template.content = "# This file is a template, and might need editing before it works on your project.\n" + new_template.content - end + not_found!(template.to_s.singularize) unless new_template present new_template, with: Entities::Template end |