summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-05-13 10:57:03 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-05-20 15:58:36 -0500
commitab96ca2bf1ae72817ff5cedf1792c8f7563ebdef (patch)
treeacd247a2f19a43a2686bbec797fcec93f7846738 /lib
parent79620c501da19bfda5818b8dca75b6ec9c10e762 (diff)
downloadgitlab-ce-ab96ca2bf1ae72817ff5cedf1792c8f7563ebdef.tar.gz
Dropdown implementationzj-gitignore-dropdown
Diffstat (limited to 'lib')
-rw-r--r--lib/api/gitignores.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/gitignores.rb b/lib/api/gitignores.rb
index 1af9ba6b316..270c9501dd2 100644
--- a/lib/api/gitignores.rb
+++ b/lib/api/gitignores.rb
@@ -12,15 +12,15 @@ module API
# Get the text for a specific gitignore
#
# Parameters:
- # key (required) - The key of a license
+ # name (required) - The name of a license
#
# Example Request:
- # GET /gitignores/elixir
+ # GET /gitignores/Elixir
#
- get 'gitignores/:key' do
- required_attributes! [:key]
+ get 'gitignores/:name' do
+ required_attributes! [:name]
- gitignore = Gitlab::Gitignore.find(params[:key])
+ gitignore = Gitlab::Gitignore.find(params[:name])
not_found!('.gitignore') unless gitignore
present gitignore, with: Entities::Gitignore