summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/snippet.rb10
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