Skip to content

Instantly share code, notes, and snippets.

module ShouldaContextExtensions
def self.included(base)
base.class_eval do
alias_method_chain :build, :fast_context
alias_method_chain :am_subcontext?, :fast_context
end
end
def fast_context(name, &blk)
@fast_subcontexts ||= []
@chrisk
chrisk / archfear.rb
Created February 14, 2009 03:10 — forked from archfear/archfear.rb
# Template which configures a generic Rails app with Shoulda, Factory Girl,
# HAML, etc while commiting each step into git.
#
# Make sure you have Rails 2.3rc1 or greater installed and run:
# rails -d mysql -m http://gist.github.com/raw/57458/06345c42a92048e699af3140ccd28bbcd8915bc5/archfear.rb my_app
# Helper methods
# Modified version of the "gem" method which places the "config.gem..." lines
# after the examples in config/environment.rb.