Class: Thredded::Workgroup::NavsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/thredded/workgroup/navs_controller.rb

Instance Method Summary collapse

Methods included from AllUnreadFollowedTopics

#all_topics_scope, #all_unread_followed_topics_count

Methods included from ApplicationControllerRetaining

#topics_scope, #unread_followed_topics_count

Instance Method Details

#all_topicsObject



16
17
18
# File 'app/controllers/thredded/workgroup/navs_controller.rb', line 16

def all_topics
  @topics = gather_topics(Thredded::Topic.all)
end

#awaitingObject



20
21
22
23
# File 'app/controllers/thredded/workgroup/navs_controller.rb', line 20

def awaiting
  @topics = gather_topics(Thredded::Topic.followed_by(thredded_current_user)
    .where(last_user_id: thredded_current_user.id))
end

#followingObject



12
13
14
# File 'app/controllers/thredded/workgroup/navs_controller.rb', line 12

def following
  @topics = gather_topics(Thredded::Topic.followed_by(thredded_current_user))
end

#unreadObject



8
9
10
# File 'app/controllers/thredded/workgroup/navs_controller.rb', line 8

def unread
  @topics = gather_topics(Thredded::Topic.unread_followed_by(thredded_current_user))
end