Method: Sohm::Model.exists?

Defined in:
lib/sohm.rb

.exists?(id) ⇒ Boolean

Check if the ID exists within <Model>:all.

Returns:

  • (Boolean)


574
575
576
# File 'lib/sohm.rb', line 574

def self.exists?(id)
  redis.call("EXISTS", key[id]) == 1
end