summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/asset.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/models/asset.rb b/app/models/asset.rb
index c9c6296..4a20d73 100644
--- a/app/models/asset.rb
+++ b/app/models/asset.rb
@@ -7,4 +7,29 @@ class Asset < ActiveRecord::Base
7 :thumb => "100x100", 7 :thumb => "100x100",
8 } 8 }
9 ) 9 )
10
11 named_scope :images, :conditions => {
12 :upload_content_type => [
13 "image/gif",
14 "image/jpeg",
15 "image/png"
16 ]
17 }
18
19 named_scope :documents, :conditions => {
20 :upload_content_type => [
21 "application/pdf",
22 "text/plain",
23 "text/rtf"
24 ]
25 }
26
27 named_scope :audio, :conditions => {
28 :upload_content_type => [
29 "audio/mpeg",
30 "audio/x-m4a",
31 "audio/wav",
32 "audio/x-wav"
33 ]
34 }
10end 35end