Class: Thredded::Workgroup::TopicsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/thredded/workgroup/topics_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

#kickObject



10
11
12
13
14
15
# File 'app/controllers/thredded/workgroup/topics_controller.rb', line 10

def kick
  if (user_topic_follow = UserTopicFollow.where(topic_id: params[:id], user_id: params[:user_id]).first)
    user_topic_follow.destroy
  end
  render plain: "Ok"
end