diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2011-10-26 18:46:25 +0500 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2011-10-26 18:46:25 +0500 |
commit | d62200cad430565bd9f80befaf329297120330b5 (patch) | |
tree | 6217dd41e6f86e657513b509ed7a3f2bfdfa70ab /app/models/snippet.rb | |
parent | f6a67fbad5119e3d95e33cfd4f4e4992707d5ba0 (diff) | |
download | gitlab-ce-d62200cad430565bd9f80befaf329297120330b5.tar.gz |
clean-up code
* Remove trailing whitespace
* Converts hard-tabs into two-space soft-tabs
* Remove consecutive blank lines
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" |