rubocop update

This commit is contained in:
Alexander Meindl 2022-06-27 09:08:53 +02:00
parent 3c028a247d
commit 852f1f04af
5 changed files with 9 additions and 7 deletions

View File

@ -123,9 +123,6 @@ Style/MethodCallWithArgsParentheses:
Style/Documentation:
Enabled: false
Style/HashTransformValues:
Enabled: false
Naming/VariableNumber:
Enabled: true
Exclude:
@ -135,6 +132,9 @@ Style/StringConcatenation:
Exclude:
- 'app/views/additionals/_select2_ajax_call.*'
Layout/LineContinuationLeadingSpace:
Enabled: false
# see https://github.com/rubocop/rubocop-rails/issues/578
# redmine does not use load_defaults: https://rails.rubystyle.guide/#config-defaults
Rails/RedundantPresenceValidationOnBelongsTo:

View File

@ -1,5 +1,7 @@
# Changelog
## 3.0.7
## 3.0.6
- D3 7.4.5 support

View File

@ -118,7 +118,7 @@ class Dashboard < ActiveRecord::Base
elsif user.memberships.includes([:memberships]).any?
scope.where("#{table_name}.visibility = ?" \
" OR (#{table_name}.visibility = ? AND #{table_name}.id IN (" \
"SELECT DISTINCT d.id FROM #{table_name} d" \
"SELECT DISTINCT d.id FROM #{table_name} d" \
" INNER JOIN #{DashboardRole.table_name} dr ON dr.dashboard_id = d.id" \
" INNER JOIN #{MemberRole.table_name} mr ON mr.role_id = dr.role_id" \
" INNER JOIN #{Member.table_name} m ON m.id = mr.member_id AND m.user_id = ?" \

View File

@ -56,9 +56,9 @@ module Additionals
else
active.where("#{table_name}.id = ? OR #{table_name}.id IN (SELECT user_id " \
"FROM #{Member.table_name} JOIN #{MemberRole.table_name} " \
" ON #{Member.table_name}.id = #{MemberRole.table_name}.member_id" \
" ON #{Member.table_name}.id = #{MemberRole.table_name}.member_id" \
" JOIN #{Role.table_name} " \
" ON #{Role.table_name}.id = #{MemberRole.table_name}.role_id" \
" ON #{Role.table_name}.id = #{MemberRole.table_name}.role_id" \
" WHERE project_id IN (?) AND #{Role.table_name}.hide = ?)",
user.id, user.visible_project_ids, false)
end

View File

@ -2,6 +2,6 @@
module Additionals
module PluginVersion
VERSION = '3.0.6' unless defined? VERSION
VERSION = '3.0.7-main' unless defined? VERSION
end
end