Module: Transcriber::Resource::Relation::Builder
- Included in:
- Builder
- Defined in:
- lib/transcriber/resource/key/relation/builder.rb
Instance Method Summary collapse
- #belongs_to(name, options = {}) ⇒ Object
- #has_many(name, options = {}) ⇒ Object
- #has_one(name, options = {}) ⇒ Object
- #relation(name, options = {}) ⇒ Object
Instance Method Details
#belongs_to(name, options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/transcriber/resource/key/relation/builder.rb', line 19 def belongs_to(name, = {}) .merge!(many: false, has: false) relation(name, ) end |
#has_many(name, options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/transcriber/resource/key/relation/builder.rb', line 14 def has_many(name, = {}) .merge!(many: true, has: true) relation(name, ) end |
#has_one(name, options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/transcriber/resource/key/relation/builder.rb', line 9 def has_one(name, = {}) .merge!(many: false, has: true) relation(name, ) end |