diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-07-06 08:55:49 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-07-06 08:57:59 -0300 |
commit | 48fe38201d2b56aa762282c741f5ebbbd99f23a4 (patch) | |
tree | ab6280009d4d8213901a53e22ec97892595df634 /guides/source | |
parent | d38f6118259854dcf89aad6cffeadc2a13f59a16 (diff) | |
download | rails-48fe38201d2b56aa762282c741f5ebbbd99f23a4.tar.gz rails-48fe38201d2b56aa762282c741f5ebbbd99f23a4.tar.bz2 rails-48fe38201d2b56aa762282c741f5ebbbd99f23a4.zip |
Update release notes with AR::Relation#inspect change [ci skip]
See 07314e64fd62fb8e6165c8c539420160da9437e9.
Also fix some tabs in AR Changelog.
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/4_0_release_notes.textile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/guides/source/4_0_release_notes.textile b/guides/source/4_0_release_notes.textile index 270c0e39c5..8415f6f83a 100644 --- a/guides/source/4_0_release_notes.textile +++ b/guides/source/4_0_release_notes.textile @@ -350,11 +350,14 @@ column_exists?(:testings, :taggable_id, :integer, null: false) column_exists?(:testings, :taggable_type, :string, default: 'Photo') </ruby> -* <tt>ActiveRelation#inspect</tt> no longer calls <tt>#to_a</tt>. This means that in places where <tt>#inspect</tt> is implied (such as in the console), creating a relation will not execute it anymore, you'll have to call <tt>#to_a</tt> when necessary: +* <tt>ActiveRecord::Relation#inspect</tt> now makes it clear that you are dealing with a <tt>Relation</tt> object rather than an array: <ruby> -User.where(:age => 30) # => returns the relation -User.where(:age => 30).to_a # => executes the query and returns the loaded objects, as before +User.where(:age => 30).inspect +# => <ActiveRecord::Relation [#<User ...>, #<User ...>]> + +User.where(:age => 30).to_a.inspect +# => [#<User ...>, #<User ...>] </ruby> * Add <tt>:collation</tt> and <tt>:ctype</tt> support to PostgreSQL. These are available for PostgreSQL 8.4 or later. |