Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 506fbc424d
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (17 sloc) 0.495 kb
class PusherController < ApplicationController
protect_from_forgery :except => :auth
def auth
if current_user
response = Pusher[params[:channel_name]].authenticate(params[:socket_id], {
:user_id => current_user.id,
:user_info => { # => optional - for example
:name => current_user.name,
:email => current_user.email
}
})
render :json => response
else
render :text => "Forbidden", :status => '403'
end
end
end
Jump to Line
Something went wrong with that request. Please try again.