Class: Thredded::NullUser
Instance Method Summary
collapse
#thredded_admin?
#thredded_can_moderate_messageboards
#thredded_can_message_users
#thredded_can_write_messageboards
#thredded_can_read_messageboards
Instance Method Details
#id ⇒ Object
14
15
16
|
# File 'app/models/thredded/null_user.rb', line 14
def id
nil
end
|
#name ⇒ Object
18
19
20
|
# File 'app/models/thredded/null_user.rb', line 18
def name
I18n.t('thredded.null_user_name')
end
|
#thredded_anonymous? ⇒ Boolean
30
31
32
|
# File 'app/models/thredded/null_user.rb', line 30
def thredded_anonymous?
true
end
|
#thredded_display_name ⇒ Object
42
43
44
|
# File 'app/models/thredded/null_user.rb', line 42
def thredded_display_name
to_s
end
|
#thredded_private_topics ⇒ Object
10
11
12
|
# File 'app/models/thredded/null_user.rb', line 10
def thredded_private_topics
Thredded::PrivateTopic.none
end
|
#thredded_user_detail ⇒ Object
34
35
36
|
# File 'app/models/thredded/null_user.rb', line 34
def thredded_user_detail
Thredded::UserDetail.new
end
|
#thredded_user_preference ⇒ Object
38
39
40
|
# File 'app/models/thredded/null_user.rb', line 38
def thredded_user_preference
Thredded::UserPreference.new
end
|
#to_s ⇒ Object
22
23
24
|
# File 'app/models/thredded/null_user.rb', line 22
def to_s
name
end
|
#valid? ⇒ Boolean
26
27
28
|
# File 'app/models/thredded/null_user.rb', line 26
def valid?
false
end
|