Sha256: 0b5d4b2918f44edd24143e992082b787cd5de6420bf768cd12c6f6410b81844d

Contents?: true

Size: 368 Bytes

Versions: 3

Compression:

Stored size: 368 Bytes

Contents

module Granite
  module Form
    module Model
      module Associations
        class EmbedsAny < Base
        private

          def build_object(attributes)
            reflection.klass.new(attributes)
          end

          def embed_object(object)
            object.instance_variable_set(:@embedder, owner)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
granite-form-0.2.0 lib/granite/form/model/associations/embeds_any.rb
granite-form-0.1.1 lib/granite/form/model/associations/embeds_any.rb
granite-form-0.1.0 lib/granite/form/model/associations/embeds_any.rb