Add and apply Style/RedundantArgument rubocop rule

This rule was added in rubocop 1.4.0.
This commit is contained in:
Javi Martín
2021-08-11 16:25:46 +02:00
parent f90c23ca88
commit aef1e4660f
3 changed files with 6 additions and 3 deletions

View File

@@ -490,6 +490,9 @@ Style/Proc:
Style/RaiseArgs:
Enabled: true
Style/RedundantArgument:
Enabled: true
Style/RedundantCondition:
Enabled: true

View File

@@ -47,7 +47,7 @@ class Management::UsersController < Management::BaseController
end
def user_without_email
new_password = "aAbcdeEfghiJkmnpqrstuUvwxyz23456789$!".split("").sample(10).join("")
new_password = "aAbcdeEfghiJkmnpqrstuUvwxyz23456789$!".split("").sample(10).join
@user.password = new_password
@user.password_confirmation = new_password

View File

@@ -6,8 +6,8 @@
<% Setting.mime_types[group].each do |content_type, mime_type_value| %>
<span class="content-type">
<%= check_box_tag content_type,
setting.value.split(" ").include?(mime_type_value),
setting.value.split(" ").include?(mime_type_value) %>
setting.value.split.include?(mime_type_value),
setting.value.split.include?(mime_type_value) %>
<%= label_tag content_type, content_type.upcase %>
</span>
<% end %>