Class: Keyper::ApiKey

Inherits:
ApplicationRecord show all
Defined in:
app/models/keyper/api_key.rb

Instance Method Summary collapse

Instance Method Details

#should_update_attributes?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/models/keyper/api_key.rb', line 11

def should_update_attributes?
  return last_used_at.nil? || last_used_at < Keyper.attribute_refresh_interval.ago
end