Sha256: b35a8b09b220e130f17716ffd2396f28ba78d036d1f1539179e3255c3960f05f
Contents?: true
Size: 295 Bytes
Versions: 4
Compression:
Stored size: 295 Bytes
Contents
class User < AbstractUser ROLES = ['reader', 'editor', 'publisher', 'administrator'] validates_inclusion_of :role, in: ROLES validates_length_of :forename, :surname, within: 2..255 def name "#{forename} #{surname}" end def initials "#{forename[0]}#{surname[0]}" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
iqvoc-4.13.2 | app/models/user.rb |
iqvoc-4.13.0 | app/models/user.rb |
iqvoc-4.12.1 | app/models/user.rb |
iqvoc-4.12.0 | app/models/user.rb |