diff options
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 95d6a07d545..0f488a8c94a 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -13,7 +13,7 @@ class Snippet < ActiveRecord::Base validates :title, :presence => true, :length => { :within => 0..255 } - + validates :file_name, :presence => true, :length => { :within => 0..255 } @@ -22,9 +22,8 @@ class Snippet < ActiveRecord::Base :presence => true, :length => { :within => 0..10000 } - def self.content_types - [ + [ ".rb", ".py", ".pl", ".scala", ".c", ".cpp", ".java", ".haml", ".html", ".sass", ".scss", ".xml", ".php", ".erb", ".js", ".sh", ".coffee", ".yml", ".md" |