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?
|
:present?: :blank?
|
||||||
:zero?: ~
|
:zero?: ~
|
||||||
|
|
||||||
|
Style/KeywordArgumentsMerging:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/LineEndConcatenation:
|
Style/LineEndConcatenation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ class Admin::AllowedTableActionsComponent < ApplicationComponent
|
|||||||
end
|
end
|
||||||
|
|
||||||
def table_actions_component
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<%= content %>
|
<%= content %>
|
||||||
|
|
||||||
<% if actions.include?(:edit) %>
|
<% 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 %>
|
<% end %>
|
||||||
|
|
||||||
<% if actions.include?(:destroy) %>
|
<% 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 %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
RSpec::Matchers.define :have_avatar do |text, **options|
|
RSpec::Matchers.define :have_avatar do |text, **options|
|
||||||
match do |page|
|
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
|
end
|
||||||
|
|
||||||
failure_message do
|
failure_message do
|
||||||
|
|||||||
Reference in New Issue
Block a user