BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
snippet.rb
app/models/snippet.rb
+2
-0
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