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.
64 65 66 |
# File 'lib/dynamoid/associations.rb', line 64 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.
77 78 79 |
# File 'lib/dynamoid/associations.rb', line 77 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.
38 39 40 |
# File 'lib/dynamoid/associations.rb', line 38 def has_many(name, = {}) association(:has_many, name, ) end |
#has_one(name, options = {}) ⇒ Object
create a has_one association for this document.
51 52 53 |
# File 'lib/dynamoid/associations.rb', line 51 def has_one(name, = {}) association(:has_one, name, ) end |