]> source.dussan.org Git - redmine.git/commitdiff
use "attr_writer" instead of "attr_accessor" for WikiPage#deleted_attachment_ids
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 7 Oct 2019 11:45:22 +0000 (11:45 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 7 Oct 2019 11:45:22 +0000 (11:45 +0000)
WikiPage#deleted_attachment_ids is already defined in this class.

git-svn-id: http://svn.redmine.org/redmine/trunk@18617 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/models/wiki_page.rb

index 2392983c2771eb29c634fadd67f07f83c94f0f7b..961f887542195f99f8f97bcc21031b609a259fa1 100644 (file)
@@ -493,10 +493,6 @@ Lint/DeprecatedClassMethods:
     - 'test/unit/attachment_test.rb'
     - 'test/unit/issue_import_test.rb'
 
-Lint/DuplicateMethods:
-  Exclude:
-    - 'app/models/wiki_page.rb'
-
 Lint/EmptyWhen:
   Exclude:
     - 'app/controllers/issues_controller.rb'
index 50fbe83c822088e7ef6a84de930cf7f97efb22f0..ede750e80c8c92f33324f951cfdfd39583e263cd 100644 (file)
@@ -41,7 +41,8 @@ class WikiPage < ActiveRecord::Base
                      :permission => :view_wiki_pages,
                      :project_key => "#{Wiki.table_name}.project_id"
 
-  attr_accessor :redirect_existing_links, :deleted_attachment_ids
+  attr_accessor :redirect_existing_links
+  attr_writer   :deleted_attachment_ids
 
   validates_presence_of :title
   validates_format_of :title, :with => /\A[^,\.\/\?\;\|\s]*\z/