Skip to content

Commit

Permalink
Another rename
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Sep 20, 2019
1 parent 76c40f6 commit c9c3b8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/installation/widgets/product_selector.rb
Expand Up @@ -20,7 +20,7 @@ class ProductSelector < CWM::RadioButtons
# @param skip_validation [Boolean] Skip value validation
def initialize(products, skip_validation: false)
@products = products
@items = products.map { |p| [widget_id(p), p.label] }
@items = products.map { |p| [item_id(p), p.label] }
@skip_validation = skip_validation
textdomain "installation"
end
Expand All @@ -38,12 +38,12 @@ def init
disable if registered?
return unless selected

self.value = widget_id(selected)
self.value = item_id(selected)
end

def store
log.info "Selected product: #{value}"
@product = products.find { |p| widget_id(p) == value }
@product = products.find { |p| item_id(p) == value }
log.info "Found product: #{@product}"

return unless @product
Expand Down Expand Up @@ -87,7 +87,7 @@ def registered?
false
end

def widget_id(prod)
def item_id(prod)
"#{prod.name}-#{prod.version}-#{prod.arch}"
end
end
Expand Down

0 comments on commit c9c3b8f

Please sign in to comment.