Skip to content

Instantly share code, notes, and snippets.

View wkrsz's full-sized avatar

Wojtek Kruszewski wkrsz

View GitHub Profile
@wkrsz
wkrsz / usher.rb
Created May 7, 2010 14:16
hack to support post_url(@post)
require 'rubygems'
require 'usher'
# according to README should be:
# Usher::Util::Rails.activate
# but above gives an error: vendor/plugins/usher/lib/usher/util/rails.rb:13: class definition in method body (SyntaxError)
# - so instead we load appropriate interface manually:
ActionController::Routing.module_eval "remove_const(:Routes); Routes = Usher::Interface.for(:rails23)"