Project

General

Profile

Revision 367f39d2

Added by Sebastian Gräßl over 5 years ago

Fixes #19694 - Align rubocop configuration with foreman-core

And fix offenses

View differences:

app/controllers/containers_controller.rb
99 99
  end
100 100

  
101 101
  def container_deletion
102
    if params[:compute_resource_id].present?
103
      compute_resource_id = params[:compute_resource_id]
104
      container_uuid      = params[:id]
102
    # TODO: Refactor to recognize params[:compute_resource_id] as well.
103
    compute_resource_id = params[:compute_resource_id].tap { |id| id.present? ? id : nil }
104
    if compute_resource_id
105
      container_uuid = params[:id]
105 106
      @container ||= Container.authorized("#{action_permission}_#{controller_name}".to_sym).find_by_uuid(container_uuid)
106 107
    else
107 108
      find_container

Also available in: Unified diff