diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-07 03:02:26 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-07 03:02:26 -0800 |
commit | 6a29ea04ae78d88f4756e6ebe48b8e9ee999143f (patch) | |
tree | 3b377422a60e2819a489aa0439ea850749462074 /activemodel/lib | |
parent | 17ecdd388c70f7faf002ef21be6a674b4c0df7ca (diff) | |
parent | aabd61af8eca03ab7e627ca532c17f0a314984ca (diff) | |
download | rails-6a29ea04ae78d88f4756e6ebe48b8e9ee999143f.tar.gz rails-6a29ea04ae78d88f4756e6ebe48b8e9ee999143f.tar.bz2 rails-6a29ea04ae78d88f4756e6ebe48b8e9ee999143f.zip |
Merge pull request #3549 from luckydev/rmethod
remove_method tests and changes
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/observing.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb index 7a910d18e7..cd8eb357de 100644 --- a/activemodel/lib/active_model/observing.rb +++ b/activemodel/lib/active_model/observing.rb @@ -187,8 +187,7 @@ module ActiveModel 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. |