display recent snippets at top
This commit is contained in:
parent
5e584ee626
commit
000c032482
2 changed files with 3 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue