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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user