Skip to content

Commit 9ed4b70

Browse files
Refactor if/else
1 parent 0cec088 commit 9ed4b70

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/controllers/mixins/checked_id_mixin.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ def find_checked_items(prefix = nil)
3030

3131
# If id is present use id, unless when nested list exists, example on summary pages
3232
if params[:id].present? && params[nested_list_item_key] != "on" && has_no_check
33-
if params[:id].kind_of?(Array)
34-
params[:id]
35-
else
36-
[params[:id]]
37-
end
33+
Array.wrap(params[:id])
3834
elsif params[:miq_grid_checks].present?
3935
params[:miq_grid_checks].split(",").collect(&:to_i)
4036
else

0 commit comments

Comments
 (0)