Sha256: 1565f0089f997f35000bda31d7d662054bc36f319cdfec4dfab1a4211b4353ba
Contents?: true
Size: 324 Bytes
Versions: 35
Compression:
Stored size: 324 Bytes
Contents
class SocialAccount < ActiveRecord::Base include ActiveUUID::UUID belongs_to :user def unlink if self.user.social_accounts.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 end
Version data entries
35 entries across 35 versions & 1 rubygems