Sha256: 7049a020765a928e1e5b3e8073288b05839c117405ace45439ae2f23c533bd79

Contents?: true

Size: 498 Bytes

Versions: 9

Compression:

Stored size: 498 Bytes

Contents

module ActiveData
  module Model
    module Associations
      module Reflections
        class EmbedsOne < EmbedsAny
          include Singular

          def self.build(target, generated_methods, name, options = {}, &block)
            target.add_attribute(ActiveData::Model::Attributes::Reflections::Base, name) if target < ActiveData::Model::Attributes
            options[:validate] = true unless options.key?(:validate)
            super
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
active_data-1.2.0 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.7 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.6 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.5 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.4 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.3 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.2 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.1 lib/active_data/model/associations/reflections/embeds_one.rb
active_data-1.1.0 lib/active_data/model/associations/reflections/embeds_one.rb