aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-08-03 11:51:52 +0100
committerJon Leighton <j@jonathanleighton.com>2012-08-03 11:51:52 +0100
commit55b24888bbe23af3361fa23891c150e28f27809e (patch)
tree1bb4d28de4838071f31afcf861fc623c06359966 /activemodel/lib/active_model
parent0a6833b6f701c8c8febadfe2f45e25df29493602 (diff)
downloadrails-55b24888bbe23af3361fa23891c150e28f27809e.tar.gz
rails-55b24888bbe23af3361fa23891c150e28f27809e.tar.bz2
rails-55b24888bbe23af3361fa23891c150e28f27809e.zip
Remove ActiveRecord::Base.to_a
On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/observing.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb
index ab8bcae402..acc96ddc9f 100644
--- a/activemodel/lib/active_model/observing.rb
+++ b/activemodel/lib/active_model/observing.rb
@@ -214,7 +214,7 @@ module ActiveModel
# end
# end
def observed_classes
- [observed_class].compact.flatten
+ Array(observed_class)
end
# The class observed by default is inferred from the observer's class name: