Class: Rack::PushNotification::Device
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- Rack::PushNotification::Device
- Defined in:
- lib/rack/push-notification/models/device.rb
Instance Method Summary collapse
Instance Method Details
#before_validation ⇒ Object
14 15 16 |
# File 'lib/rack/push-notification/models/device.rb', line 14 def before_validation normalize_token! end |
#validate ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rack/push-notification/models/device.rb', line 18 def validate super validates_presence :token validates_unique :token validates_format /[[:xdigit:]]{40}/, :token end |