Sha256: 72ae3da78ad167566208c1c38e07e34b06725c8e15f0090cfeee631982a08ae4
Contents?: true
Size: 918 Bytes
Versions: 3
Compression:
Stored size: 918 Bytes
Contents
class ExportFile < ActiveRecord::Base attr_accessible :export_content_type, :export_file_name, :export_file_size, :state belongs_to :user validates_associated :user_id if configatron.uploaded_file.storage == :s3 has_attached_file :export, :storage => :s3, :s3_credentials => "#{Rails.root.to_s}/config/s3.yml", :s3_permissions => :private else has_attached_file :export, :path => ":rails_root/private/system/:class/:attachment/:id_partition/:style/:filename" end validates_attachment_content_type :export, :content_type => ['text/csv', 'text/plain', 'text/tab-separated-values', 'application/octet-stream'] state_machine :initial => :pending do event :sm_start do transition [:pending, :started] => :started end event :sm_complete do transition :started => :completed end event :sm_fail do transition :started => :failed end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enju_export-0.1.0.pre | app/models/export_file.rb |
enju_export-0.1.0 | app/models/export_file.rb |
enju_export-0.0.3 | app/models/export_file.rb |