diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-08-16 18:06:59 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-08-16 22:06:31 +0200 |
commit | dc8e1676cda528cfca9ec9679da10ff90ec76282 (patch) | |
tree | 72e2f128c7c72d5bf9d600aa91cd036a33d9fac9 /lib/api/templates.rb | |
parent | 374cdda3c0072218126f717f85f321b566a3262f (diff) | |
download | gitlab-ce-dc8e1676cda528cfca9ec9679da10ff90ec76282.tar.gz |
Upgrade grape to 1.0
Main feature was the deprication of the Hashie stuff, so the access by
calling keys as method is gone now.
Diffstat (limited to 'lib/api/templates.rb')
-rw-r--r-- | lib/api/templates.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/templates.rb b/lib/api/templates.rb index 0fc13b35d5b..f70bc0622b7 100644 --- a/lib/api/templates.rb +++ b/lib/api/templates.rb @@ -57,7 +57,7 @@ module API end get "templates/licenses" do options = { - featured: declared(params).popular.present? ? true : nil + featured: declared(params)[:popular].present? ? true : nil } licences = ::Kaminari.paginate_array(Licensee::License.all(options)) present paginate(licences), with: Entities::RepoLicense @@ -71,7 +71,7 @@ module API requires :name, type: String, desc: 'The name of the template' end get "templates/licenses/:name", requirements: { name: /[\w\.-]+/ } do - not_found!('License') unless Licensee::License.find(declared(params).name) + not_found!('License') unless Licensee::License.find(declared(params)[:name]) template = parsed_license_template @@ -102,7 +102,7 @@ module API requires :name, type: String, desc: 'The name of the template' end get "templates/#{template_type}/:name" do - new_template = klass.find(declared(params).name) + new_template = klass.find(declared(params)[:name]) render_response(template_type, new_template) end |