Add and apply Style/KeywordArgumentsMerging rubocop rule
This rule was introduced in RuboCop 1.68 to encourage passing additional keyword arguments directly instead of using merge.
This commit is contained in:
@@ -743,6 +743,9 @@ Style/InvertibleUnlessCondition:
|
||||
:present?: :blank?
|
||||
:zero?: ~
|
||||
|
||||
Style/KeywordArgumentsMerging:
|
||||
Enabled: true
|
||||
|
||||
Style/LineEndConcatenation:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -15,6 +15,6 @@ class Admin::AllowedTableActionsComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def table_actions_component
|
||||
@table_actions_component ||= Admin::TableActionsComponent.new(record, **options.merge(actions: actions))
|
||||
@table_actions_component ||= Admin::TableActionsComponent.new(record, **options, actions: actions)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<%= content %>
|
||||
|
||||
<% if actions.include?(:edit) %>
|
||||
<%= action(:edit, **edit_options.merge(text: edit_text, path: edit_path)) %>
|
||||
<%= action(:edit, **edit_options, text: edit_text, path: edit_path) %>
|
||||
<% end %>
|
||||
|
||||
<% if actions.include?(:destroy) %>
|
||||
<%= action(:destroy, **destroy_options.merge(text: destroy_text, path: destroy_path)) %>
|
||||
<%= action(:destroy, **destroy_options, text: destroy_text, path: destroy_path) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
RSpec::Matchers.define :have_avatar do |text, **options|
|
||||
match do |page|
|
||||
page.has_css?("svg.initialjs-avatar", **{ exact_text: text }.merge(options))
|
||||
page.has_css?("svg.initialjs-avatar", **{ exact_text: text }, **options)
|
||||
end
|
||||
|
||||
failure_message do
|
||||
|
||||
Reference in New Issue
Block a user