Class: Thredded::Workgroup::NavsController

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

Instance Method Summary collapse

Instance Method Details

#all_topicsObject



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

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

#awaitingObject



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

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

#followingObject



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

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

#unreadObject



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

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