Class: ActiveEntity::Associations::Embeds::Builder::EmbedsOne
- Inherits:
-
SingularAssociation
- Object
- Association
- SingularAssociation
- ActiveEntity::Associations::Embeds::Builder::EmbedsOne
- Defined in:
- lib/active_entity/associations/embeds/builder/embeds_one.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Association
Class Method Summary collapse
Methods inherited from SingularAssociation
define_accessors, define_constructors, valid_options
Methods inherited from Association
Class Method Details
.define_validations(model, reflection) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/active_entity/associations/embeds/builder/embeds_one.rb', line 9 def self.define_validations(model, reflection) super if reflection.[:required] model.validates_presence_of reflection.name, message: :required end end |
.macro ⇒ Object
5 6 7 |
# File 'lib/active_entity/associations/embeds/builder/embeds_one.rb', line 5 def self.macro :embeds_one end |