Class: BotUser
Constant Summary
collapse
- ROLES =
['match_editor']
Class Method Summary
collapse
#ability, default_user_role, #name, #owns_role?, #to_s
Class Method Details
.create(attributes = nil, &block) ⇒ Object
16
17
18
19
|
# File 'app/models/bot_user.rb', line 16
def self.create(attributes = nil, &block)
raise TypeError, 'Botuser already exist' if first
super
end
|
.create!(attributes = nil, &block) ⇒ Object
21
22
23
24
|
# File 'app/models/bot_user.rb', line 21
def self.create!(attributes = nil, &block)
raise TypeError, 'Botuser already exist' if first
super
end
|
.instance ⇒ Object
6
7
8
9
10
11
12
13
14
|
# File 'app/models/bot_user.rb', line 6
def self.instance
first_or_create(
email: 'botuser@iqvoc',
password: 'botuser',
password_confirmation: 'botuser',
role: 'match_editor',
active: true
)
end
|