Permalink
Browse files

remove model counter

  • Loading branch information...
1 parent 4667199 commit a7d55f08239fc448e36a10fbedc2775f35a46ccc @blahed committed Jan 30, 2013
Showing with 0 additions and 28 deletions.
  1. +0 −28 lib/von/model_counter.rb
View
@@ -1,28 +0,0 @@
-module Von
- module ModelCounter
- extend ::ActiveSupport::Concern
-
- module ClassMethods
- def increments_stat(key, options = {})
- increment_method = "increment_stat_#{key.gsub(/:/, '_')}".to_sym
-
- define_method increment_method do
- Von.increment(key)
- end
-
- case options[:on]
- when :create
- after_create increment_method
- when :save
- after_save increment_method
- when :update
- after_update increment_method
- else
- # default to create
- after_create increment_method
- end
- end
- end
-
- end
-end

0 comments on commit a7d55f0

Please sign in to comment.