diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index cf8cc891db1..f4afd10a9f4 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -315,8 +315,7 @@ def add_label(options, f, attr) if options[:label_help].present? label += ' '.html_safe + popover("", options[:label_help], options[:label_help_options] || {}) end - label = label.present? ? label_tag(attr, label.to_s + required_mark.to_s, :class => label_size + " control-label") : '' - label + label.present? ? label_tag(attr, label.to_s + required_mark.to_s, :class => label_size + " control-label") : '' end def check_required(options, f, attr) diff --git a/app/models/compute_resource.rb b/app/models/compute_resource.rb index a555156e9bd..00a127b435c 100644 --- a/app/models/compute_resource.rb +++ b/app/models/compute_resource.rb @@ -375,8 +375,7 @@ def vm_compute_attributes(vm) vm_attrs = vm_attrs.reject { |k, v| k == :id } vm_attrs = set_vm_volumes_attributes(vm, vm_attrs) - vm_attrs = set_vm_interfaces_attributes(vm, vm_attrs) - vm_attrs + set_vm_interfaces_attributes(vm, vm_attrs) end def vm_ready(vm) diff --git a/app/models/host/managed.rb b/app/models/host/managed.rb index 3075f466317..528a5d9a4a8 100644 --- a/app/models/host/managed.rb +++ b/app/models/host/managed.rb @@ -535,8 +535,7 @@ def apply_inherited_attributes(attributes, initialized = true) attributes[attribute] = value end - attributes = apply_facet_attributes(new_hostgroup, attributes) - attributes + apply_facet_attributes(new_hostgroup, attributes) end def hash_clone(value) diff --git a/app/services/foreman/renderer.rb b/app/services/foreman/renderer.rb index b05d8d23a13..10608d960ff 100644 --- a/app/services/foreman/renderer.rb +++ b/app/services/foreman/renderer.rb @@ -28,7 +28,7 @@ def render_template_to_tempfile(template:, prefix:, host: nil, params: {}, varia file end - def get_source(klass: nil, template:, **args) + def get_source(template:, klass: nil, **args) klass ||= Foreman::Renderer::Source::Database klass.new(template) end diff --git a/app/services/foreman/renderer/source/string.rb b/app/services/foreman/renderer/source/string.rb index 27c04b97223..e7ad67584a9 100644 --- a/app/services/foreman/renderer/source/string.rb +++ b/app/services/foreman/renderer/source/string.rb @@ -2,7 +2,7 @@ module Foreman module Renderer module Source class String < Foreman::Renderer::Source::Base - def initialize(name: 'Unnamed', content:) + def initialize(content:, name: 'Unnamed') @name = name @content = content end diff --git a/app/services/proxy_reference_registry.rb b/app/services/proxy_reference_registry.rb index 9d8c9d958c1..40ae5f1b074 100644 --- a/app/services/proxy_reference_registry.rb +++ b/app/services/proxy_reference_registry.rb @@ -44,8 +44,7 @@ def join_reference_arrays(references, other_references) end memo end - references = references.concat to_add - references + references.concat to_add end private diff --git a/config/initializers/ldap_instrumentation.rb b/config/initializers/ldap_instrumentation.rb index eb3dc86d4a2..f5fabaf8a9a 100644 --- a/config/initializers/ldap_instrumentation.rb +++ b/config/initializers/ldap_instrumentation.rb @@ -1,6 +1,6 @@ -require 'foreman/ldap/ldap_subscriber.rb' -require 'foreman/ldap/ldap_fluff_subscriber.rb' -require 'foreman/ldap/net_ldap_subscriber.rb' +require 'foreman/ldap/ldap_subscriber' +require 'foreman/ldap/ldap_fluff_subscriber' +require 'foreman/ldap/net_ldap_subscriber' # Debug logging from net-ldap and ldap_fluff events sent via ActiveSupport::Notifications Rails.application.config.after_initialize do