move the path alias to a more appropriate location
This commit is contained in:
parent
e08ff468e8
commit
e7b512efa6
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue