Sha256: 63039034dfe11532da99eeeffc1ae5538c70c4049bb5d89a8991f7a65eb6c0ff

Contents?: true

Size: 598 Bytes

Versions: 128

Compression:

Stored size: 598 Bytes

Contents

module ForemanRemoteExecution
  module TemplateExtensions
    extend ActiveSupport::Concern

    included do
      # autosave => true is required so the changes of inputs are saved even if template was not changed
      has_many :foreign_input_sets, :dependent => :destroy, :foreign_key => 'template_id', :autosave => true

      def template_inputs_with_foreign(templates_stack = [])
        self.template_inputs.to_a + foreign_input_sets.map { |set| set.inputs(templates_stack) }.flatten
      end
      accepts_nested_attributes_for :foreign_input_sets, :allow_destroy => true
    end
  end
end

Version data entries

128 entries across 128 versions & 1 rubygems

Version Path
foreman_remote_execution-4.5.0 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.4.0 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.3.1 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.3.0 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.2.3 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.2.2 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.2.1 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.2.0 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.1.0 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.7 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-4.0.0 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.6 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.5 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.4 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.3 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.2.2 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.2 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.1 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.3.0 app/models/concerns/foreman_remote_execution/template_extensions.rb
foreman_remote_execution-3.2.1 app/models/concerns/foreman_remote_execution/template_extensions.rb