Module: Thredded::UserPermissions::Read::All
- Extended by:
- ActiveSupport::Concern
- Included in:
- NullUser, Thredded::UserExtender
- Defined in:
- app/models/thredded/user_permissions/read/all.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#thredded_can_read_messageboard?(messageboard) ⇒ Boolean
Whether the user can read the given messageboard.
-
#thredded_can_read_messageboards ⇒ ActiveRecord::Relation<Thredded::Messageboard>
Messageboards that the user can read.
Instance Method Details
#thredded_can_read_messageboard?(messageboard) ⇒ Boolean
Returns Whether the user can read the given messageboard.
17 18 19 20 |
# File 'app/models/thredded/user_permissions/read/all.rb', line 17 def () scope = scope == Thredded::Messageboard.all || scope.include?() end |
#thredded_can_read_messageboards ⇒ ActiveRecord::Relation<Thredded::Messageboard>
Returns messageboards that the user can read.
11 12 13 |
# File 'app/models/thredded/user_permissions/read/all.rb', line 11 def Thredded::Messageboard.all end |