Module: Dynamoid::Associations::ClassMethods
- Defined in:
- lib/dynamoid/associations.rb
Instance Method Summary collapse
-
#belongs_to(name, options = {}) ⇒ Object
create a belongs_to association for this document.
-
#has_and_belongs_to_many(name, options = {}) ⇒ Object
create a has_and_belongs_to_many association for this document.
-
#has_many(name, options = {}) ⇒ Object
create a has_many association for this document.
-
#has_one(name, options = {}) ⇒ Object
create a has_one association for this document.
Instance Method Details
#belongs_to(name, options = {}) ⇒ Object
create a belongs_to association for this document.
63 64 65 |
# File 'lib/dynamoid/associations.rb', line 63 def belongs_to(name, = {}) association(:belongs_to, name, ) end |
#has_and_belongs_to_many(name, options = {}) ⇒ Object
create a has_and_belongs_to_many association for this document.
76 77 78 |
# File 'lib/dynamoid/associations.rb', line 76 def has_and_belongs_to_many(name, = {}) association(:has_and_belongs_to_many, name, ) end |
#has_many(name, options = {}) ⇒ Object
create a has_many association for this document.
37 38 39 |
# File 'lib/dynamoid/associations.rb', line 37 def has_many(name, = {}) association(:has_many, name, ) end |
#has_one(name, options = {}) ⇒ Object
create a has_one association for this document.
50 51 52 |
# File 'lib/dynamoid/associations.rb', line 50 def has_one(name, = {}) association(:has_one, name, ) end |