diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-05-13 10:57:03 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-05-20 15:58:36 -0500 |
commit | ab96ca2bf1ae72817ff5cedf1792c8f7563ebdef (patch) | |
tree | acd247a2f19a43a2686bbec797fcec93f7846738 /lib | |
parent | 79620c501da19bfda5818b8dca75b6ec9c10e762 (diff) | |
download | gitlab-ce-ab96ca2bf1ae72817ff5cedf1792c8f7563ebdef.tar.gz |
Dropdown implementationzj-gitignore-dropdown
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/gitignores.rb | 10 |
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 |