fixes by houndci

This commit is contained in:
Gopesh Tulsyan 2014-05-16 12:23:16 +05:30
parent 8c69d0f651
commit 1f3e9a39c8

View file

@ -3,9 +3,10 @@ class EventAttachment < ActiveRecord::Base
belongs_to :event belongs_to :event
attr_accessible :public, :attachment, :event_id, :title attr_accessible :public, :attachment, :event_id, :title
has_attached_file :attachment has_attached_file :attachment
validates_attachment_content_type :attachment, content_type: ['text/plain','image/jpg','image/jpeg', validates_attachment_content_type :attachment, content_type:
'image/pjpeg','image/png','image/x-png','image/gif','application/pdf','application/msword', ['text/plain', 'image/jpg', 'image/jpeg','image/pjpeg', 'image/png', 'image/x-png', 'image/gif',
'applicationvnd.ms-word','applicaiton/vnd.openxmlformats-officedocument.wordprocessingm1.document', 'application/pdf', 'application/msword','applicationvnd.ms-word',
'applicaiton/vnd.openxmlformats-officedocument.wordprocessingm1.document',
'application/msexcel', 'application/vnd.ms-excel', 'application/msexcel', 'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/mspowerpoint', 'application/vnd.ms-powerpoint', 'application/mspowerpoint', 'application/vnd.ms-powerpoint',
@ -25,7 +26,6 @@ class EventAttachment < ActiveRecord::Base
"delete_url" => conference_proposal_event_attachment_path(self.event.conference.short_title, self.event_id, self.id), "delete_url" => conference_proposal_event_attachment_path(self.event.conference.short_title, self.event_id, self.id),
"delete_type" => "DELETE" "delete_type" => "DELETE"
} }
end end
#:path => ":rails_root/public/system/:attachment/:id/:style/:filename", #:path => ":rails_root/public/system/:attachment/:id/:style/:filename",
# :url => "/system/:attachment/:id/:style/:filename" # :url => "/system/:attachment/:id/:style/:filename"