Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
e7b512ef
Commit
e7b512ef
authored
Jun 22, 2016
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move the path alias to a more appropriate location
parent
e08ff468
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
app/models/snippet.rb
app/models/snippet.rb
+5
-5
No files found.
app/models/snippet.rb
View file @
e7b512ef
...
@@ -21,11 +21,6 @@ class Snippet < ActiveRecord::Base
...
@@ -21,11 +21,6 @@ class Snippet < ActiveRecord::Base
format:
{
with:
Gitlab
::
Regex
.
file_name_regex
,
format:
{
with:
Gitlab
::
Regex
.
file_name_regex
,
message:
Gitlab
::
Regex
.
file_name_regex_message
}
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
:content
,
presence:
true
validates
:visibility_level
,
inclusion:
{
in:
Gitlab
::
VisibilityLevel
.
values
}
validates
:visibility_level
,
inclusion:
{
in:
Gitlab
::
VisibilityLevel
.
values
}
...
@@ -87,6 +82,11 @@ class Snippet < ActiveRecord::Base
...
@@ -87,6 +82,11 @@ class Snippet < ActiveRecord::Base
0
0
end
end
# alias for compatibility with blobs and highlighting
def
path
file_name
end
def
name
def
name
file_name
file_name
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment