summaryrefslogtreecommitdiff
path: root/app/models/asset.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/asset.rb')
-rw-r--r--app/models/asset.rb29
1 files changed, 4 insertions, 25 deletions
diff --git a/app/models/asset.rb b/app/models/asset.rb
index 5bfea764..d27c5255 100644
--- a/app/models/asset.rb
+++ b/app/models/asset.rb
@@ -11,29 +11,8 @@ class Asset < ActiveRecord::Base
11 :headline => "460x250#" 11 :headline => "460x250#"
12 } 12 }
13 ) 13 )
14 14
15 named_scope :images, :conditions => { 15 scope :images, where(:upload_content_type => ["image/gif", "image/jpeg", "image/png"])
16 :upload_content_type => [ 16 scope :documents, where(:upload_content_type => ["application/pdf", "text/plain", "text/rtf"])
17 "image/gif", 17 scope :audio, where(:upload_content_type => ["audio/mpeg", "audio/x-m4a", "audio/wav", "audio/x-wav"])
18 "image/jpeg",
19 "image/png"
20 ]
21 }
22
23 named_scope :documents, :conditions => {
24 :upload_content_type => [
25 "application/pdf",
26 "text/plain",
27 "text/rtf"
28 ]
29 }
30
31 named_scope :audio, :conditions => {
32 :upload_content_type => [
33 "audio/mpeg",
34 "audio/x-m4a",
35 "audio/wav",
36 "audio/x-wav"
37 ]
38 }
39end 18end