2014-03-19 21:13:03 -04:00
|
|
|
* `ActiveRecord#touch` should accept many attributes at once. Suggested at #14423.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
photo = Photo.last
|
|
|
|
photo.touch(:signed_at, :sealed_at)
|
|
|
|
photo.updated_at # was changed
|
|
|
|
photo.signed_at # was changed
|
|
|
|
photo.sealed_at # was changed
|
2014-03-20 07:00:28 -04:00
|
|
|
|
2014-03-19 21:13:03 -04:00
|
|
|
*James Pinto*
|
|
|
|
|
2014-03-20 05:30:30 -04:00
|
|
|
* `rake db:structure:dump` only dumps schema information if the schema
|
|
|
|
migration table exists.
|
|
|
|
|
|
|
|
Fixes #14217.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2014-03-07 08:36:09 -05:00
|
|
|
* Reap connections that were checked out by now-dead threads, instead
|
|
|
|
of waiting until they disconnect by themselves. Before this change,
|
|
|
|
a suitably constructed series of short-lived threads could starve
|
|
|
|
the connection pool, without ever having more than a couple alive at
|
|
|
|
the same time.
|
|
|
|
|
|
|
|
*Matthew Draper*
|
|
|
|
|
2014-03-17 09:20:23 -04:00
|
|
|
* `where.not` adds `references` for `includes` like normal `where` calls do.
|
|
|
|
|
|
|
|
Fixes #14406.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2014-03-17 03:44:56 -04:00
|
|
|
* Extend fixture `$LABEL` replacement to allow string interpolation.
|
|
|
|
|
2014-03-15 21:49:04 -04:00
|
|
|
Example:
|
|
|
|
|
|
|
|
martin:
|
|
|
|
email: $LABEL@email.com
|
|
|
|
|
|
|
|
users(:martin).email # => martin@email.com
|
|
|
|
|
|
|
|
*Eric Steele*
|
2014-03-17 03:44:56 -04:00
|
|
|
|
2014-03-13 13:05:10 -04:00
|
|
|
* Add support for `Relation` be passed as parameter on `QueryCache#select_all`.
|
|
|
|
|
|
|
|
Fixes #14361.
|
|
|
|
|
|
|
|
*arthurnn*
|
|
|
|
|
2014-03-17 03:44:56 -04:00
|
|
|
* Passing an Active Record object to `find` is now deprecated. Call `.id`
|
|
|
|
on the object first.
|
2014-03-13 14:47:12 -04:00
|
|
|
|
2014-03-17 03:44:56 -04:00
|
|
|
* Passing an Active Record object to `find` or `exists?` is now deprecated.
|
|
|
|
Call `.id` on the object first.
|
2014-03-13 14:40:35 -04:00
|
|
|
|
2014-03-17 03:44:56 -04:00
|
|
|
* Only use BINARY for MySQL case sensitive uniqueness check when column has a case insensitive collation.
|
2013-11-25 14:59:18 -05:00
|
|
|
|
|
|
|
*Ryuta Kamizono*
|
|
|
|
|
2014-03-17 03:44:56 -04:00
|
|
|
* Support for MySQL 5.6 fractional seconds.
|
2014-03-12 09:15:46 -04:00
|
|
|
|
|
|
|
*arthurnn*, *Tatsuhiko Miyagawa*
|
|
|
|
|
2014-03-10 17:10:25 -04:00
|
|
|
* Support for Postgres `citext` data type enabling case-insensitive where
|
|
|
|
values without needing to wrap in UPPER/LOWER sql functions.
|
|
|
|
|
|
|
|
*Troy Kruthoff*, *Lachlan Sylvester*
|
|
|
|
|
2012-11-25 16:01:27 -05:00
|
|
|
* Only save has_one associations if record has changes.
|
|
|
|
Previously after save related callbacks, such as `#after_commit`, were triggered when the has_one
|
|
|
|
object did not get saved to the db.
|
|
|
|
|
|
|
|
*Alan Kennedy*
|
|
|
|
|
2014-03-05 08:00:23 -05:00
|
|
|
* Allow strings to specify the `#order` value.
|
2013-05-22 23:17:15 -04:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
Model.order(id: 'asc').to_sql == Model.order(id: :asc).to_sql
|
|
|
|
|
2014-03-05 03:07:12 -05:00
|
|
|
*Marcelo Casiraghi*, *Robin Dupret*
|
2013-05-22 23:17:15 -04:00
|
|
|
|
2013-12-09 12:52:36 -05:00
|
|
|
* Dynamically register PostgreSQL enum OIDs. This prevents "unknown OID"
|
|
|
|
warnings on enum columns.
|
|
|
|
|
|
|
|
*Dieter Komendera*
|
|
|
|
|
2014-02-28 03:49:52 -05:00
|
|
|
* `includes` is able to detect the right preloading strategy when string
|
|
|
|
joins are involved.
|
|
|
|
|
|
|
|
Fixes #14109.
|
|
|
|
|
|
|
|
*Aaron Patterson*, *Yves Senn*
|
|
|
|
|
2014-02-25 20:24:44 -05:00
|
|
|
* Fixed error with validation with enum fields for records where the
|
|
|
|
value for any enum attribute is always evaluated as 0 during
|
|
|
|
uniqueness validation.
|
|
|
|
|
2014-03-05 03:07:12 -05:00
|
|
|
Fixes #14172.
|
2014-02-25 20:24:44 -05:00
|
|
|
|
|
|
|
*Vilius Luneckas* *Ahmed AbouElhamayed*
|
|
|
|
|
2014-03-05 03:07:12 -05:00
|
|
|
* `before_add` callbacks are fired before the record is saved on
|
|
|
|
`has_and_belongs_to_many` assocations *and* on `has_many :through`
|
|
|
|
associations. Before this change, `before_add` callbacks would be fired
|
|
|
|
before the record was saved on `has_and_belongs_to_many` associations, but
|
|
|
|
*not* on `has_many :through` associations.
|
2014-02-25 17:57:06 -05:00
|
|
|
|
2014-03-05 03:07:12 -05:00
|
|
|
Fixes #14144.
|
2014-02-25 17:57:06 -05:00
|
|
|
|
2014-02-13 14:49:19 -05:00
|
|
|
* Fixed STI classes not defining an attribute method if there is a
|
|
|
|
conflicting private method defined on its ancestors.
|
|
|
|
|
|
|
|
Fixes #11569.
|
|
|
|
|
|
|
|
*Godfrey Chan*
|
|
|
|
|
2014-03-05 03:07:12 -05:00
|
|
|
* Coerce strings when reading attributes. Fixes #10485.
|
2013-08-07 12:56:49 -04:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
book = Book.new(title: 12345)
|
|
|
|
book.save!
|
|
|
|
book.title # => "12345"
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2014-01-22 08:20:01 -05:00
|
|
|
* Deprecate half-baked support for PostgreSQL range values with excluding beginnings.
|
|
|
|
We currently map PostgreSQL ranges to Ruby ranges. This conversion is not fully
|
|
|
|
possible because the Ruby range does not support excluded beginnings.
|
|
|
|
|
|
|
|
The current solution of incrementing the beginning is not correct and is now
|
|
|
|
deprecated. For subtypes where we don't know how to increment (e.g. `#succ`
|
|
|
|
is not defined) it will raise an ArgumentException for ranges with excluding
|
|
|
|
beginnings.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2014-01-21 06:14:11 -05:00
|
|
|
* Support for user created range types in PostgreSQL.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2014-02-25 07:14:35 -05:00
|
|
|
Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/activerecord/CHANGELOG.md) for previous changes.
|