Class: SocialAccount
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SocialAccount
- Includes:
- ActiveUUID::UUID
- Defined in:
- app/models/social_account.rb
Instance Method Summary collapse
Methods included from ActiveUUID::UUID
Instance Method Details
#unlink ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/models/social_account.rb', line 6 def unlink if self.user..count == 1 && (self.user.email.blank? || self.user.encrypted_password.blank?) errors.add(:base, "only_social_and_no_email") false else self.destroy end end |