diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-06-22 11:50:58 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-06-27 14:17:49 -0700 |
commit | e7b512efa65aebe26cd0240a4d077475c42761c1 (patch) | |
tree | 798d4299bfda7d1b31c72bace83361e775f6ad43 /app/models/snippet.rb | |
parent | e08ff468e826801bbb999186302f4679d8ed5c41 (diff) | |
download | gitlab-ce-e7b512efa65aebe26cd0240a4d077475c42761c1.tar.gz |
move the path alias to a more appropriate location
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 40728d04574..d18d1474855 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -21,11 +21,6 @@ class Snippet < ActiveRecord::Base format: { with: Gitlab::Regex.file_name_regex, message: Gitlab::Regex.file_name_regex_message } - # [jneen] alias for compatibility with blobs and highlighting - def path - file_name - end - validates :content, presence: true validates :visibility_level, inclusion: { in: Gitlab::VisibilityLevel.values } @@ -87,6 +82,11 @@ class Snippet < ActiveRecord::Base 0 end + # alias for compatibility with blobs and highlighting + def path + file_name + end + def name file_name end |