Skip to content

Instantly share code, notes, and snippets.

loganathan-s / logger.rb
Last active Aug 29, 2015
Remote syslog
View logger.rb
require 'socket'
require 'syslog_protocol'
module RemoteSyslogLogger
class UdpSender
def initialize(remote_hostname, remote_port, options = {})
@remote_hostname = remote_hostname
@remote_port = remote_port
@whinyerrors = options[:whinyerrors]
View paper trial
##Custom VERSION table for User model
class UserVersion < PaperTrail::Version
self.table_name = :user_versions
attr_accessible :login, :first_name, :last_name, :email
# User Model
class User < ActiveRecord::Base