Sha256: 6caab726c35c9413259d5d05e7104aa726306349e605448d5b7ea7dbf502716d
Contents?: true
Size: 549 Bytes
Versions: 13
Compression:
Stored size: 549 Bytes
Contents
module Samvera module Persona module UsernameBehavior extend ActiveSupport::Concern included do before_create :check_for_mandatory end def check_for_mandatory if self.respond_to?(:username) if self.email.present? && self.username.blank? self.username = self.email end end if self.respond_to?(:uid) if self.email.present? && self.uid.blank? self.uid = self.email end end true end end end end
Version data entries
13 entries across 13 versions & 1 rubygems