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
15
16
17
|
# File 'app/models/thredded/null_user.rb', line 15
def id
nil
end
|
#marked_for_destruction? ⇒ Boolean
47
48
49
|
# File 'app/models/thredded/null_user.rb', line 47
def marked_for_destruction?
return false
end
|
#name ⇒ Object
19
20
21
|
# File 'app/models/thredded/null_user.rb', line 19
def name
I18n.t('thredded.null_user_name')
end
|
#thredded_anonymous? ⇒ Boolean
31
32
33
|
# File 'app/models/thredded/null_user.rb', line 31
def thredded_anonymous?
true
end
|
#thredded_display_name ⇒ Object
43
44
45
|
# File 'app/models/thredded/null_user.rb', line 43
def thredded_display_name
to_s
end
|
#thredded_private_topics ⇒ Object
11
12
13
|
# File 'app/models/thredded/null_user.rb', line 11
def thredded_private_topics
Thredded::PrivateTopic.none
end
|
#thredded_user_detail ⇒ Object
35
36
37
|
# File 'app/models/thredded/null_user.rb', line 35
def thredded_user_detail
Thredded::UserDetail.new
end
|
#thredded_user_preference ⇒ Object
39
40
41
|
# File 'app/models/thredded/null_user.rb', line 39
def thredded_user_preference
Thredded::UserPreference.new
end
|
#to_s ⇒ Object
23
24
25
|
# File 'app/models/thredded/null_user.rb', line 23
def to_s
name
end
|
#valid? ⇒ Boolean
27
28
29
|
# File 'app/models/thredded/null_user.rb', line 27
def valid?
false
end
|