Module: Thredded::UserExtender
- Extended by:
- ActiveSupport::Concern
- Includes:
- Thredded::UserPermissions::Admin::IfAdminColumnTrue, Thredded::UserPermissions::Message::ReadersOfWriteableBoards, Thredded::UserPermissions::Moderate::IfModeratorColumnTrue, Thredded::UserPermissions::Read::All, Thredded::UserPermissions::Write::All
- Defined in:
- app/models/thredded/user_extender.rb
Instance Method Summary collapse
- #thredded_anonymous? ⇒ Boolean
- #thredded_display_name ⇒ Object
- #thredded_user_detail ⇒ Object
- #thredded_user_preference ⇒ Object
Methods included from Thredded::UserPermissions::Admin::IfAdminColumnTrue
Methods included from Thredded::UserPermissions::Moderate::IfModeratorColumnTrue
#thredded_can_moderate_messageboard?, #thredded_can_moderate_messageboards
Methods included from Thredded::UserPermissions::Message::ReadersOfWriteableBoards
Methods included from Thredded::UserPermissions::Write::All
#thredded_can_write_messageboards
Methods included from Thredded::UserPermissions::Read::All
#thredded_can_read_messageboard?, #thredded_can_read_messageboards
Instance Method Details
#thredded_anonymous? ⇒ Boolean
60 61 62 |
# File 'app/models/thredded/user_extender.rb', line 60 def thredded_anonymous? false end |
#thredded_display_name ⇒ Object
64 65 66 67 68 |
# File 'app/models/thredded/user_extender.rb', line 64 def thredded_display_name send(Thredded.user_display_name_method).presence || fail(<<-ERROR) User.#{Thredded.user_display_name_method} must not be empty: please set make sure non nil or configure Thredded.user_display_name_method") ERROR end |
#thredded_user_detail ⇒ Object
56 57 58 |
# File 'app/models/thredded/user_extender.rb', line 56 def thredded_user_detail super || build_thredded_user_detail end |
#thredded_user_preference ⇒ Object
52 53 54 |
# File 'app/models/thredded/user_extender.rb', line 52 def thredded_user_preference super || build_thredded_user_preference end |