Module: JSONAPI::Consumer::Associations::HasOne::ClassMethods
- Defined in:
- lib/jsonapi/consumer/associations/has_one.rb
Instance Method Summary collapse
Instance Method Details
#has_one(attr_name, options = {}) ⇒ Object
7 8 9 |
# File 'lib/jsonapi/consumer/associations/has_one.rb', line 7 def has_one(attr_name, = {}) self.associations += [HasOne::Association.new(attr_name, self, )] end |