File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ def checked_item_id(hash = params)
1010 # Common routine to find checked items on a page (checkbox ids are
1111 # "check_xxx" where xxx is the item id or index)
1212 def find_checked_items ( prefix = nil )
13- has_no_check = true
1413 nested_list_item_key = ""
1514 # Check if nested list items are tagged.
1615 if params [ "miq_grid_checks" ] . present?
@@ -20,13 +19,7 @@ def find_checked_items(prefix = nil)
2019 nested_list_item_key = "select-row-#{ nested_list_item } "
2120 end
2221
23- params . each do |var , val |
24- if var . starts_with? ( "check_" )
25- has_no_check = false
26- else
27- next
28- end
29- end
22+ has_no_check = params . each_key . none? { |var | var . start_with? ( "check_" ) }
3023
3124 # If id is present use id, unless when nested list exists, example on summary pages
3225 if params [ :id ] . present? && params [ nested_list_item_key ] != "on" && has_no_check
You can’t perform that action at this time.
0 commit comments