module NoBrainer::Document::PrimaryKey
Constants
- DEFAULT_PK_NAME
Public Instance Methods
==(other)
click to toggle source
Calls superclass method
# File lib/no_brainer/document/primary_key.rb, line 18 def ==(other) return super unless self.class == other.class return self.equal?(other) if in_atomic? !pk_value.nil? && pk_value == other.pk_value end
Also aliased as: eql?
cache_key()
click to toggle source
# File lib/no_brainer/document/primary_key.rb, line 27 def cache_key "#{self.class.table_name}/#{pk_value}" end
pk_value()
click to toggle source
# File lib/no_brainer/document/primary_key.rb, line 10 def pk_value __send__(self.class.pk_name) end
pk_value=(value)
click to toggle source
# File lib/no_brainer/document/primary_key.rb, line 14 def pk_value=(value) __send__("#{self.class.pk_name}=", value) end
to_key()
click to toggle source
# File lib/no_brainer/document/primary_key.rb, line 31 def to_key # ActiveModel::Conversion [pk_value] end