mirror of
https://github.com/redmine/redmine.git
synced 2025-11-11 07:46:02 +01:00
Adds :inverse_of option.
git-svn-id: http://svn.redmine.org/redmine/trunk@13666 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -31,7 +31,7 @@ module Redmine
|
||||
attachable_options[:delete_permission] = options.delete(:delete_permission) || "edit_#{self.name.pluralize.underscore}".to_sym
|
||||
|
||||
has_many :attachments, lambda {order("#{Attachment.table_name}.created_on ASC, #{Attachment.table_name}.id ASC")},
|
||||
options.merge(:as => :container, :dependent => :destroy)
|
||||
options.merge(:as => :container, :dependent => :destroy, :inverse_of => :container)
|
||||
send :include, Redmine::Acts::Attachable::InstanceMethods
|
||||
before_save :attach_saved_attachments
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user