test/dummy/app/models/audio.rb in attached-0.5.5 vs test/dummy/app/models/audio.rb in attached-0.5.6
- old
+ new
@@ -1,14 +1,14 @@
class Audio < ActiveRecord::Base
-
+
has_attached :file, :processor => :audio, :path => "audios/files/:style/:identifier:extension",
:styles => {
:full => { :preset => "320kbps", :extension => ".aac" },
:large => { :preset => "256kbps", :extension => ".aac" },
:small => { :preset => "128kbps", :extension => ".aac" },
}
-
+
validates_attached_presence :file
validates_attached_size :file, :in => 2.kilobytes..2.megabytes
validates_attached_extension :file, :in => %w(wav aif)
-
+
end