diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-29 13:52:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-29 13:52:29 +0000 |
commit | 05262d2c346039c967f78b24b95f3ffb1e7ac15b (patch) | |
tree | 111c79ed58ac7978b4ac6163dcc7441f36241335 /lib | |
parent | 288c014aa7aa608751dbafeb2c8b358f2fec5c22 (diff) | |
download | redmine-05262d2c346039c967f78b24b95f3ffb1e7ac15b.tar.gz redmine-05262d2c346039c967f78b24b95f3ffb1e7ac15b.zip |
Adds :inverse_of option.
git-svn-id: http://svn.redmine.org/redmine/trunk@13666 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb | 2 |
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 e86b83eb3..ff1ee23f2 100644 --- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb +++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb @@ -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 |