Skip to content

Instantly share code, notes, and snippets.

local mongrel2 = require 'mongrel2'
local sender_id = '558c92aa-1644-4e24-a524-39baad0f8e78'
local sub_addr = 'tcp://127.0.0.1:8989'
local pub_addr = 'tcp://127.0.0.1:8988'
local io_threads = 1
local response_string = [[
<pre>
SENDER: %s
module Slug
def to_param
"#{super}-#{slug}"
end
def slug
to_s.gsub("'", "").gsub(/\p{^Alnum}/u, " ").strip.gsub(/\s+/, "-").downcase
end
end
require 'sinatra/base'
module Sinatra
# module to catch Sinatra errors and send a email
module ExceptionMailer
def initialize(app)
@app = app
# set parameters here..
yield self if block_given?
end