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

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

.rubocop_todo.yml
app/models/custom_field_value.rb

index b2aee54e2182d12ba808e654e99235d3bc543ea0..cbaa842b87fa0e1d160738d06be71a8e33b30a17 100644 (file)
@@ -495,7 +495,6 @@ Lint/DeprecatedClassMethods:
 
 Lint/DuplicateMethods:
   Exclude:
-    - 'app/models/custom_field_value.rb'
     - 'app/models/query.rb'
     - 'app/models/wiki_page.rb'
 
index aa2e6614504359e1aa8fb5c46063930ea6a3f3f6..8e4cda92a62bef7276b87ccad62b67987d9d5d97 100644 (file)
@@ -18,7 +18,8 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 class CustomFieldValue
-  attr_accessor :custom_field, :customized, :value, :value_was
+  attr_accessor :custom_field, :customized, :value_was
+  attr_reader   :value
 
   def initialize(attributes={})
     attributes.each do |name, v|