Class: Guts::Medium
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Guts::Medium
- Includes:
- MultisiteScopeConcern
- Defined in:
- app/models/guts/medium.rb
Overview
Medium model which utilizes PaperClip
Constant Summary collapse
- CONTENT_TYPE_REGEX =
Regex used for sizing_only_images
%r{^(image|(x-)?application)/(x-png|pjpeg|jpeg|jpg|png|gif)$}
Instance Method Summary collapse
-
#sizing_only_images ⇒ Boolean
Determine if the file is an image and can be resized by Paperclip.
Instance Method Details
#sizing_only_images ⇒ Boolean
Determine if the file is an image and can be resized by Paperclip
31 32 33 |
# File 'app/models/guts/medium.rb', line 31 def sizing_only_images false unless self[:file_content_type] =~ CONTENT_TYPE_REGEX end |