Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/bullet/ext/object.rb
Instance Method Summary collapse
Instance Method Details
#bullet_key ⇒ Object
2 3 4 |
# File 'lib/bullet/ext/object.rb', line 2 def bullet_key "#{self.class}:#{self.primary_key_value}" end |
#primary_key_value ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/bullet/ext/object.rb', line 6 def primary_key_value if self.class.respond_to?(:primary_key) && self.class.primary_key self.send self.class.primary_key else self.id end end |