Permalink
Browse files

replaced remove and define method calls to :redefine

  • Loading branch information...
1 parent 17947ce commit 4cef581fcf83f161edcd681bbda1461d5f7d5f33 @luckydev luckydev committed Nov 7, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 activemodel/lib/active_model/observing.rb
@@ -187,8 +187,7 @@ class << self
def observe(*models)
models.flatten!
models.collect! { |model| model.respond_to?(:to_sym) ? model.to_s.camelize.constantize : model }
- remove_possible_method(:observed_classes)
- define_method(:observed_classes) { models }
+ redefine_method(:observed_classes) { models }
end
# Returns an array of Classes to observe.

0 comments on commit 4cef581

Please sign in to comment.