Class: OauthTokenValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- OauthTokenValidator
- Defined in:
- app/validators/oauth_token_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
2 3 4 5 6 |
# File 'app/validators/oauth_token_validator.rb', line 2 def validate(record) send "validate_#{record.provider}_token", record rescue Faraday::ConnectionFailed, Faraday::TimeoutError record.errors.add :oauth_token, 'could not check token authenticity' end |