diff options
author | Go MAEDA <maeda@farend.jp> | 2023-12-20 07:16:35 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-12-20 07:16:35 +0000 |
commit | d9ef2d191cdb3d04508530275bc99c3710820fcb (patch) | |
tree | 72d676c6332c4add4fe6b276c0085f247c0f2e22 /app/models/query.rb | |
parent | c51e4937e7c7abafec00c883f3d7e45e53e5175f (diff) | |
download | redmine-d9ef2d191cdb3d04508530275bc99c3710820fcb.tar.gz redmine-d9ef2d191cdb3d04508530275bc99c3710820fcb.zip |
Fix RuboCop offense Lint/SymbolConversion (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22531 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 3208dc535..f0c29ea98 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -30,7 +30,7 @@ class QueryColumn self.totalable = options[:totalable] || false self.default_order = options[:default_order] @inline = options.key?(:inline) ? options[:inline] : true - @caption_key = options[:caption] || "field_#{name}".to_sym + @caption_key = options[:caption] || :"field_#{name}" @frozen = options[:frozen] end @@ -108,7 +108,7 @@ class QueryAssociationColumn < QueryColumn def initialize(association, attribute, options={}) @association = association @attribute = attribute - name_with_assoc = "#{association}.#{attribute}".to_sym + name_with_assoc = :"#{association}.#{attribute}" super(name_with_assoc, options) end @@ -126,7 +126,7 @@ end class QueryCustomFieldColumn < QueryColumn def initialize(custom_field, options={}) - name = "cf_#{custom_field.id}".to_sym + name = :"cf_#{custom_field.id}" super( name, :sortable => custom_field.order_statement || false, @@ -181,7 +181,7 @@ end class QueryAssociationCustomFieldColumn < QueryCustomFieldColumn def initialize(association, custom_field, options={}) super(custom_field, options) - self.name = "#{association}.cf_#{custom_field.id}".to_sym + self.name = :"#{association}.cf_#{custom_field.id}" # TODO: support sorting by association custom field self.sortable = false self.groupable = false |