Revision 1298:4f746d8966dd lib/plugins/acts_as_attachable
| lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb | ||
|---|---|---|
| 1 | 1 |
# Redmine - project management software |
| 2 |
# Copyright (C) 2006-2012 Jean-Philippe Lang
|
|
| 2 |
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
| 3 | 3 |
# |
| 4 | 4 |
# This program is free software; you can redistribute it and/or |
| 5 | 5 |
# modify it under the terms of the GNU General Public License |
| ... | ... | |
| 78 | 78 |
end |
| 79 | 79 |
if attachments.is_a?(Array) |
| 80 | 80 |
attachments.each do |attachment| |
| 81 |
next unless attachment.is_a?(Hash) |
|
| 81 | 82 |
a = nil |
| 82 | 83 |
if file = attachment['file'] |
| 83 | 84 |
next unless file.size > 0 |
Also available in: Unified diff