Sha256: 84cd5f49c578c62bd0fef1116bfe977b4cc7a46e64d3382df49f2e7ac5ad4316

Contents?: true

Size: 793 Bytes

Versions: 65

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

module ForemanAnsible
  module Concerns
    # Helpers to select proxy and call ProxyAPI
    module ImportControllerHelper
      extend ActiveSupport::Concern

      included do
        # rubocop:disable Rails/LexicallyScopedActionFilter
        before_action :find_resource, :only => [:destroy]
        before_action :find_proxy, :only => [:import, :import_variables, :confirm_import]
        before_action :create_importer, :only => [:import, :confirm_import, :import_variables, :confirm_import]
        before_action :default_order, :only => [:index]
        # rubocop:enable Rails/LexicallyScopedActionFilter
      end

      def find_proxy
        return nil unless params[:proxy]
        @proxy = SmartProxy.find(params[:proxy])
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
foreman_ansible-10.2.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.1.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.0.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.0.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.4 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-9.0.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.3 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-9.0.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.2 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-8.0.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-8.0.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.0.4 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.0.3 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.0.2 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.0.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.0.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-6.3.4 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-6.3.3 app/controllers/foreman_ansible/concerns/import_controller_helper.rb