This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

lib refactoring

git-svn-id: https://svn.thoughtbot.com/plugins/when/trunk@326 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
1 parent 461ec95 commit 36eb9796bdf71bb06ed2e8c2715563433eade95f jcarroll committed Feb 13, 2008
Showing with 1 addition and 11 deletions.
  1. +1 −4 lib/callbacks.rb
  2. +0 −7 lib/when.rb
View
@@ -9,11 +9,8 @@ class << klass
callbacks.each do |callback|
src = <<-END
- def #{callback}_with_conditions (*callbacks, &block)
+ def #{callback}_with_conditions(*callbacks)
options = callbacks.extract_options!
- if block_given?
- callbacks << block
- end
callbacks.each do |callback|
#{callback}_without_conditions do |record|
unless (! options[:if].nil? && ! evaluate_condition(options[:if], record)) ||
View
@@ -3,10 +3,3 @@
ActiveRecord::Base.send :include, ActiveRecordHook::Callbacks
ActionController::Base.send :include, ActionControllerHook::Filters
-
-# module When
-
-# def
-# end
-
-# end

0 comments on commit 36eb979

Please sign in to comment.