Sha256: b12a539b284fd3dbe548bc6cace59487718b200e093027e0252a3f4e7c87f716
Contents?: true
Size: 532 Bytes
Versions: 16
Compression:
Stored size: 532 Bytes
Contents
class BotUser < AbstractUser ROLES = ['match_editor'] validates_inclusion_of :role, in: ROLES def self.instance first_or_create( email: 'botuser@iqvoc', password: 'botuser', password_confirmation: 'botuser', role: 'match_editor', active: true ) end def self.create(attributes = nil, &block) raise TypeError, 'Botuser already exist' if first super end def self.create!(attributes = nil, &block) raise TypeError, 'Botuser already exist' if first super end end
Version data entries
16 entries across 16 versions & 1 rubygems