Class: Chatty::AdminChatsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/chatty/admin_chats_controller.rb

Instance Method Summary collapse

Instance Method Details

#handleObject



13
14
15
16
17
18
19
# File 'app/controllers/chatty/admin_chats_controller.rb', line 13

def handle
  @chat.handled = true
  @chat.save!
  @chat.create_activity :key => "chatty/chat.handled", :owner => current_user
  
  redirect_to admin_chat_path(@chat)
end

#indexObject



4
5
6
7
8
# File 'app/controllers/chatty/admin_chats_controller.rb', line 4

def index
  @ransack_params = params[:q] || {}
  @ransack = Chatty::Chat.ransack(@ransack_params)
  @chats = @ransack.result.order(:id).reverse_order
end

#showObject



10
11
# File 'app/controllers/chatty/admin_chats_controller.rb', line 10

def show
end