Skip to content

Commit

Permalink
Better solution for document upcase extension
Browse files Browse the repository at this point in the history
Related to 2367d25
  • Loading branch information
atd committed Oct 9, 2012
1 parent af4a940 commit c0547ba
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion documents/app/models/audio.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Audio < Document
has_attached_file :file,
:url => '/:class/:id.:extension',
:url => '/:class/:id.:content_type_extension',
:path => ':rails_root/documents/:class/:id_partition/:style',
:styles => SocialStream::Documents.audio_styles,
:processors => [ :ffmpeg ]
Expand Down
4 changes: 2 additions & 2 deletions documents/app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Document < ActiveRecord::Base
IMAGE_FORMATS = ["doc","ppt","xls","rar","zip","mpeg","plain","pdf"]

has_attached_file :file,
:url => '/:class/:id.:extension',
:url => '/:class/:id.:content_type_extension',
:path => ':rails_root/documents/:class/:id_partition/:style/:filename.:extension'

paginates_per 20
Expand Down Expand Up @@ -72,7 +72,7 @@ def as_json(options = nil)
:title => title,
:description => description,
:author => author.name,
:src => file.to_s.downcase
:src => file.to_s
}
end

Expand Down
2 changes: 1 addition & 1 deletion documents/app/models/picture.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Picture < Document
has_attached_file :file,
:url => '/:class/:id.:extension',
:url => '/:class/:id.:content_type_extension',
:path => ':rails_root/documents/:class/:id_partition/:style',
:styles => SocialStream::Documents.picture_styles

Expand Down
2 changes: 1 addition & 1 deletion documents/app/models/video.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Video < Document
has_attached_file :file,
:url => '/:class/:id.:extension',
:url => '/:class/:id.:content_type_extension',
:default_url => 'missing_:style.png',
:path => ':rails_root/documents/:class/:id_partition/:style',
:styles => SocialStream::Documents.video_styles,
Expand Down

0 comments on commit c0547ba

Please sign in to comment.