Update release notes with AR::Relation#inspect change [ci skip]
See 07314e64fd
.
Also fix some tabs in AR Changelog.
This commit is contained in:
parent
d38f611825
commit
48fe38201d
|
@ -2,11 +2,11 @@
|
|||
|
||||
* Add `add_reference` and `remove_reference` schema statements. Aliases, `add_belongs_to`
|
||||
and `remove_belongs_to` are acceptable. References are reversible.
|
||||
Examples:
|
||||
Examples:
|
||||
|
||||
# Create a user_id column
|
||||
add_reference(:products, :user)
|
||||
# Create a supplier_id, supplier_type columns and appropriate index
|
||||
# Create a supplier_id, supplier_type columns and appropriate index
|
||||
add_reference(:products, :supplier, polymorphic: true, index: true)
|
||||
# Remove polymorphic reference
|
||||
remove_reference(:products, :supplier, polymorphic: true)
|
||||
|
@ -867,7 +867,7 @@
|
|||
|
||||
* LRU cache in mysql and sqlite are now per-process caches.
|
||||
|
||||
* lib/active_record/connection_adapters/mysql_adapter.rb: LRU cache keys are per process id.
|
||||
* lib/active_record/connection_adapters/mysql_adapter.rb: LRU cache keys are per process id.
|
||||
* lib/active_record/connection_adapters/sqlite_adapter.rb: ditto
|
||||
*Aaron Patterson*
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue