summaryrefslogtreecommitdiff
path: root/app/models/license_template.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-10-03 00:00:38 +0100
committerNick Thomas <nick@gitlab.com>2018-10-05 11:34:43 +0100
commit25bd49e4f57fe15f9d61dc9376a5b7dc35b30f64 (patch)
treefaef4e9d73e9845413462013c868eace19a11abf /app/models/license_template.rb
parentae014e189773f7299c12c1050334b3e8fe7b15d8 (diff)
downloadgitlab-ce-25bd49e4f57fe15f9d61dc9376a5b7dc35b30f64.tar.gz
Backport project template API to CE
Diffstat (limited to 'app/models/license_template.rb')
-rw-r--r--app/models/license_template.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/license_template.rb b/app/models/license_template.rb
index 693a6a89fd2..73e403f98b4 100644
--- a/app/models/license_template.rb
+++ b/app/models/license_template.rb
@@ -12,12 +12,10 @@ class LicenseTemplate
(fullname|name\sof\s(author|copyright\sowner))
[\>\}\]]}xi.freeze
- attr_reader :id, :name, :category, :nickname, :url, :meta
+ attr_reader :key, :name, :category, :nickname, :url, :meta
- alias_method :key, :id
-
- def initialize(id:, name:, category:, content:, nickname: nil, url: nil, meta: {})
- @id = id
+ def initialize(key:, name:, category:, content:, nickname: nil, url: nil, meta: {})
+ @key = key
@name = name
@category = category
@content = content