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
This commit is contained in:
parent
4ef90b6096
commit
00927f58af
|
@ -30,7 +30,7 @@ module Redmine
|
||||||
attachable_options[:delete_permission] = options.delete(:delete_permission) || "edit_#{self.name.pluralize.underscore}".to_sym
|
attachable_options[:delete_permission] = options.delete(:delete_permission) || "edit_#{self.name.pluralize.underscore}".to_sym
|
||||||
|
|
||||||
has_many :attachments, options.merge(:as => :container,
|
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)
|
:dependent => :destroy)
|
||||||
send :include, Redmine::Acts::Attachable::InstanceMethods
|
send :include, Redmine::Acts::Attachable::InstanceMethods
|
||||||
before_save :attach_saved_attachments
|
before_save :attach_saved_attachments
|
||||||
|
|
Loading…
Reference in New Issue