Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bjeanes's full-sized avatar
🕊️

Bo Jeanes bjeanes

🕊️
View GitHub Profile
module BlahPlugin
VERSION = '1.0.0'
class << self
# add plugin to AR only if it hasn't been included before,
# which may cause stack-level-too-deep errors if you're aliasing methods
#
def enable_activerecord
return if ActiveRecord::Base.respond_to? :acts_as_blah
ActiveRecord::Base.extend BlahPlugin::Macro
@bjeanes
bjeanes / gist:38889
Created December 22, 2008 04:41 — forked from drnic/gist:38843
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
@bjeanes
bjeanes / environment.rb
Created October 1, 2008 02:18 — forked from mislav/_note.md
PostgreSQL version of GitConf to manage branched databases
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
require 'git_conf'
Rails::Initializer.run(:process, GitConf.new) do |config|
# ...
end