summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-07 18:06:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-07 18:06:42 +0000
commit00927f58af92410b52e1cb0f79198807d3888cfe (patch)
tree46f510581700a95414634e18a50197a95fb457de /lib
parent4ef90b60968050e12568bd40347f55627a97b8eb (diff)
downloadredmine-00927f58af92410b52e1cb0f79198807d3888cfe.tar.gz
redmine-00927f58af92410b52e1cb0f79198807d3888cfe.zip
Make sure that #attachments returns attachments with same timestamp in the order they were created (#12310).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10792 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
index acddf5fa9..626023b1b 100644
--- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
+++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
@@ -30,7 +30,7 @@ module Redmine
attachable_options[:delete_permission] = options.delete(:delete_permission) || "edit_#{self.name.pluralize.underscore}".to_sym
has_many :attachments, options.merge(:as => :container,
- :order => "#{Attachment.table_name}.created_on",
+ :order => "#{Attachment.table_name}.created_on ASC, #{Attachment.table_name}.id ASC",
:dependent => :destroy)
send :include, Redmine::Acts::Attachable::InstanceMethods
before_save :attach_saved_attachments