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-12.0.5 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.4.3 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-12.0.4 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.4.2 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-12.0.3 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-12.0.2 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-12.0.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-12.0.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-11.2.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.7 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-11.2.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-11.1.2 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.6 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-11.1.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.4.1 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-7.1.5 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-11.1.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.4.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-10.3.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb
foreman_ansible-11.0.0 app/controllers/foreman_ansible/concerns/import_controller_helper.rb