Module: Errgonomic::Rails::ActiveRecordSingularAssociationWriter
- Defined in:
- lib/errgonomic/rails/active_record_optional.rb
Overview
A singular association writer is a setter, not a typed field, so it takes what a wrapped reader hands back: Some(record) assigns the record, None() clears the association. A Some of the wrong class still fails the association's own type check, naming the class inside it.
Instance Method Summary collapse
Instance Method Details
#writer(value) ⇒ Object
629 630 631 |
# File 'lib/errgonomic/rails/active_record_optional.rb', line 629 def writer(value) super(Errgonomic::Rails.(value)) end |