Sha256: 63039034dfe11532da99eeeffc1ae5538c70c4049bb5d89a8991f7a65eb6c0ff
Contents?: true
Size: 598 Bytes
Versions: 127
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
127 entries across 127 versions & 1 rubygems