Skip to content
Snippets Groups Projects
Commit 5ff8371c authored by jneen's avatar jneen
Browse files

add an alias for Snippet#path

parent 9fc53864
No related branches found
No related tags found
1 merge request!4606Add custom highlighting via .gitattributes
......@@ -20,6 +20,12 @@ class Snippet < ActiveRecord::Base
length: { within: 0..255 },
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 }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment