Module: Snaptime::Relations::ClassMethods
- Defined in:
- lib/snaptime/relations.rb
Instance Method Summary collapse
- #belongs_to_versioned(name, scope = nil, options = {}) ⇒ Object
- #has_many_versioned(name, scope = nil, options = {}, &extension) ⇒ Object
- #has_one_versioned(name, scope = nil, options = {}) ⇒ Object
Instance Method Details
#belongs_to_versioned(name, scope = nil, options = {}) ⇒ Object
21 22 23 |
# File 'lib/snaptime/relations.rb', line 21 def belongs_to_versioned(name, scope = nil, = {}) RelationsBuilder.build_versioned_relation(self, :belongs_to, name, scope, ) end |
#has_many_versioned(name, scope = nil, options = {}, &extension) ⇒ Object
17 18 19 |
# File 'lib/snaptime/relations.rb', line 17 def has_many_versioned(name, scope = nil, = {}, &extension) RelationsBuilder.build_versioned_relation(self, :has_many, name, scope, , &extension) end |
#has_one_versioned(name, scope = nil, options = {}) ⇒ Object
13 14 15 |
# File 'lib/snaptime/relations.rb', line 13 def has_one_versioned(name, scope = nil, = {}) RelationsBuilder.build_versioned_relation(self, :has_one, name, scope, ) end |