diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2010-07-08 21:34:05 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-08 22:29:08 +0200 |
commit | 4a26a292a0708df595662444e8c738ee1520ec57 (patch) | |
tree | 031cfa326ecd64efe1533eca6dcede6c7df78360 | |
parent | b09fd9ccbbe988e6edaf244d304458ad9d476c31 (diff) | |
download | rails-4a26a292a0708df595662444e8c738ee1520ec57.tar.gz rails-4a26a292a0708df595662444e8c738ee1520ec57.tar.bz2 rails-4a26a292a0708df595662444e8c738ee1520ec57.zip |
Removing method before redefining it. It was causing warnings. [#5072 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
-rw-r--r-- | activemodel/lib/active_model/observing.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb index d0f36ce3b1..eb853f01ee 100644 --- a/activemodel/lib/active_model/observing.rb +++ b/activemodel/lib/active_model/observing.rb @@ -157,6 +157,7 @@ module ActiveModel def observe(*models) models.flatten! models.collect! { |model| model.respond_to?(:to_sym) ? model.to_s.camelize.constantize : model } + remove_method(:observed_classes) define_method(:observed_classes) { models } end |