Skip to content

Commit

Permalink
some logging to see if we can figure out why hillary is having issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazan committed Jun 4, 2010
1 parent 229e302 commit a807d11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/technoweenie/attachment_fu.rb
Expand Up @@ -53,7 +53,8 @@ module AttachmentFu # :nodoc:
'video/x-3gpp2',
'video/x-flv',
'application/x-flash-video',
'video/x-m4v'
'video/x-m4v',
'application/octet-stream'
]
mattr_reader :content_types, :video_content_types, :tempfile_path, :default_processors
mattr_writer :tempfile_path
Expand Down Expand Up @@ -476,6 +477,7 @@ def set_size_from_temp_path
def attachment_attributes_valid?
[:size, :content_type].each do |attr_name|
enum = attachment_options[attr_name]
Rails.logger.info "#{attr_name.to_s} is #{send(attr_name)}"
if Object.const_defined?(:I18n) # Rails >= 2.2
errors.add attr_name, I18n.translate("activerecord.errors.messages.inclusion", attr_name => enum) unless enum.nil? || enum.include?(send(attr_name))
else
Expand Down

0 comments on commit a807d11

Please sign in to comment.