BigW Consortium Gitlab

Commit 5ff8371c by http://jneen.net/

add an alias for Snippet#path

parent 9fc53864
......@@ -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 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment