Project

General

Profile

Actions

Refactor #33395

closed

If/else statement have equal code

Added by Maxim Petukhov over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Low
Category:
-
Target version:
Branch:
Difficulty:
trivial
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

in app/views/overrides/activation_keys/_host_synced_content_select.html.erb
if/else statement have equal code:

if using_hostgroups_page?
    select_tag ks_repo_select_id,  view_to_options(kickstart_options, kickstart_repo_id, blank_or_inherit_with_id(f, :kickstart_repository)), :data => {"spinner_path" => spinner_path, "kickstart-repository-id" => kickstart_repo_id},
               :class => 'form-control',  :name => ks_repo_select_name, :disabled => kickstart_options.empty?
  else
    select_tag ks_repo_select_id,  view_to_options(kickstart_options, kickstart_repo_id, blank_or_inherit_with_id(f, :kickstart_repository)), :data => {"spinner_path" => spinner_path, "kickstart-repository-id" => kickstart_repo_id}, :class => 'form-control',  :name => ks_repo_select_name, :disabled => kickstart_options.empty?
  end

so, i think if/else statement is unnecessary

Actions

Also available in: Atom PDF