diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/observer.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/observer.rb b/activerecord/lib/active_record/observer.rb index 1a167667e3..62626e1852 100644 --- a/activerecord/lib/active_record/observer.rb +++ b/activerecord/lib/active_record/observer.rb @@ -19,13 +19,11 @@ module ActiveRecord # # Same as above, just using explicit class references # ActiveRecord::Base.observers = Cacher, GarbageCollector def observers=(*observers) - observers = [ observers ].flatten.collect do |observer| + observers = [ observers ].flatten.each do |observer| observer.is_a?(Symbol) ? observer.to_s.camelize.constantize.instance : observer.instance end - - observers.size > 1 ? observers : observers.first end end end |