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
Boxiang Sun
gitlab-ce
Commits
000c0324
Commit
000c0324
authored
Oct 27, 2011
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display recent snippets at top
parent
5e584ee6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/models/snippet.rb
app/models/snippet.rb
+2
-0
app/views/snippets/index.html.haml
app/views/snippets/index.html.haml
+1
-1
No files found.
app/models/snippet.rb
View file @
000c0324
...
...
@@ -22,6 +22,8 @@ class Snippet < ActiveRecord::Base
:presence
=>
true
,
:length
=>
{
:within
=>
0
..
10000
}
scope
:fresh
,
order
(
"created_at DESC"
)
def
self
.
content_types
[
".rb"
,
".py"
,
".pl"
,
".scala"
,
".c"
,
".cpp"
,
".java"
,
...
...
app/views/snippets/index.html.haml
View file @
000c0324
...
...
@@ -8,7 +8,7 @@
%th
Title
%th
File name
%th
=
render
@snippets
=
render
@snippets
.
fresh
:javascript
$
(
'
.delete-snippet
'
).
live
(
'
ajax:success
'
,
function
()
{
$
(
this
).
closest
(
'
tr
'
).
fadeOut
();
});
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