Skip to content
Browse files

terser

  • Loading branch information...
1 parent 957c4a9 commit b40cfff53899a2f276a0f36944188f0639f6c9c8 Nick Kallen committed Dec 11, 2008
Showing with 7 additions and 11 deletions.
  1. +3 −5 lib/cash/config.rb
  2. +4 −6 lib/cash/finders.rb
View
8 lib/cash/config.rb
@@ -9,11 +9,9 @@ def self.included(a_module)
module ClassMethods
def self.extended(a_class)
- a_class.class_eval do
- class << self
- delegate :repository, :indices, :to => :@cache_config
- alias_method_chain :inherited, :cache_config
- end
+ class << a_class
+ delegate :repository, :indices, :to => :@cache_config
+ alias_method_chain :inherited, :cache_config
end
end
View
10 lib/cash/finders.rb
@@ -8,12 +8,10 @@ def self.included(active_record_class)
module ClassMethods
def self.extended(active_record_class)
- active_record_class.class_eval do
- class << self
- alias_method_chain :find_every, :cache
- alias_method_chain :find_from_ids, :cache
- alias_method_chain :calculate, :cache
- end
+ class << active_record_class
+ alias_method_chain :find_every, :cache
+ alias_method_chain :find_from_ids, :cache
+ alias_method_chain :calculate, :cache
end
end

0 comments on commit b40cfff

Please sign in to comment.
Something went wrong with that request. Please try again.