Module: Snaptime::Relations::ClassMethods

Defined in:
lib/snaptime/relations.rb

Instance Method Summary collapse

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, options = {})
  RelationsBuilder.build_versioned_relation(self, :belongs_to, name, scope, options)
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, options = {}, &extension)
  RelationsBuilder.build_versioned_relation(self, :has_many, name, scope, options, &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, options = {})
  RelationsBuilder.build_versioned_relation(self, :has_one, name, scope, options)
end