Browse files

Docs fix for columns_hash [bradediger]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5797 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 58edaaa commit 3b4450bb8043eca6ca0d423263e598c70c50f440 @NZKoz NZKoz committed Dec 27, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
View
2 activerecord/lib/active_record/base.rb
@@ -763,7 +763,7 @@ def columns
@columns
end
- # Returns an array of column objects for the table associated with this class.
+ # Returns a hash of column objects for the table associated with this class.
def columns_hash
@columns_hash ||= columns.inject({}) { |hash, column| hash[column.name] = column; hash }
end

0 comments on commit 3b4450b

Please sign in to comment.