Class: OpenidNonce

Inherits:
CouchRest::Model::Base
  • Object
show all
Defined in:
app/models/openid_nonce.rb

Class Method Summary collapse

Class Method Details

.exists_by_target?(timestamp, salt, target) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/models/openid_nonce.rb', line 14

def self.exists_by_target?(timestamp, salt, target)
  by_target(key: target).any?{|nonce| nonce.timestamp == timestamp}
end