move the path alias to a more appropriate location

This commit is contained in:
http://jneen.net/ 2016-06-22 11:50:58 -07:00
parent e08ff468e8
commit e7b512efa6

View file

@ -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