diff --git a/vendor/rails/activerecord/lib/active_record/base.rb b/vendor/rails/activerecord/lib/active_record/base.rb index 4235fb9..559be03 100644 --- a/vendor/rails/activerecord/lib/active_record/base.rb +++ b/vendor/rails/activerecord/lib/active_record/base.rb @@ -538,6 +538,11 @@ module ActiveRecord #:nodoc: end end + # A convenience wrapper for find(id) that allows Array-like usage of + # a model. + def [](key) + find(key) + end # A convenience wrapper for find(:first, *args). You can pass in all the # same arguments to this method as you can to find(:first).