recording chat sessions

40 views
Skip to first unread message

Mukesh Unnikrishnan

unread,
May 15, 2013, 11:20:29 PM5/15/13
to faye-...@googlegroups.com
Hi all,

I m using the faye-rails gem in my application. I want to save all messages i receive in a channel. I tried using the map function in my routes to map a channel to a controller and did monitor :publish for the channel. 

This is my routes.rb for the purpose:

faye_server '/faye', :timeout => 25 do
  map '/messages/public' => ChatLogController
  map :default => :block
end
and this is my ChatLogController:
class WidgetController < FayeRails::Controller
  channel '/public/messages' do
    monitor :publish do
          puts "i am in the monitor block"
    end
  end

But i am not getting "i am in the monitor block" printed in the log. What am i doing wrong? pls help me.

Mukesh Unnikrishnan

unread,
May 15, 2013, 11:57:48 PM5/15/13
to faye-...@googlegroups.com
Hi,

sorry for the mistake in the previous mail

class ChatLogController < FayeRails::Controller
  channel '/public/messages' do
    monitor :publish do
          puts "i am in the monitor block"
    end
  end
Reply all
Reply to author
Forward
0 new messages