Skip to content

Instantly share code, notes, and snippets.

Andrew Cholakian andrewvc

Block or report user

Report or block andrewvc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:887255
class MyApp < DripDrop::Node
def action
route :my_server, :websocket_server, 'ws://'
my_server.on_open do |response| do
my_client.send_message(:name => 'time_request') do |response_message|
puts "The time is: #{response_message.body['time']}"
View authentication.rb
# include this in application controller
module Authentication
# Inclusion hook to make #current_user and #signed_in?
# available as ActionView helper methods.
def self.included(base)
base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method
# Returns true or false if the user is signed in.
You can’t perform that action at this time.