Class: Rack::Passbook::Registration
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- Rack::Passbook::Registration
- Defined in:
- lib/rack/passbook/models/registration.rb
Instance Method Summary collapse
Instance Method Details
#before_validation ⇒ Object
15 16 17 |
# File 'lib/rack/passbook/models/registration.rb', line 15 def before_validation normalize_push_token! if push_token end |
#validate ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/rack/passbook/models/registration.rb', line 19 def validate super validates_presence :device_library_identifier validates_unique %i[device_library_identifier pass_id] validates_format /[[:xdigit:]]+/, :push_token validates_exact_length 64, :push_token end |