Skip to content

Commit

Permalink
add mechanism for patching Rails
Browse files Browse the repository at this point in the history
  • Loading branch information
davejacobs committed Sep 30, 2012
1 parent 2c58c81 commit 110c8aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/letters/patch/object.rb
@@ -1,4 +1,3 @@
require "letters/patch"

Letters.patch! Object
Letters.patch! NilClass
9 changes: 9 additions & 0 deletions lib/letters/patch/rails.rb
@@ -0,0 +1,9 @@
require "letters/core"

begin
Letters.patch! ActiveRecord::Base
Letters.patch! ActionController::Base
Letters.patch! ActionMailer::Base
rescue
$stderr.puts "[warning] tried to patch Rails without Rails being loaded"
end

0 comments on commit 110c8aa

Please sign in to comment.