unify CHANGELOG format. [ci skip]
This commit is contained in:
parent
33030ea7cb
commit
afe402dac7
@ -1,5 +1,7 @@
|
||||
* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`.
|
||||
|
||||
Example:
|
||||
|
||||
def test_emails
|
||||
assert_enqueued_emails 2 do
|
||||
ContactMailer.welcome.deliver_later
|
||||
|
@ -1,7 +1,7 @@
|
||||
* Migrating to keyword arguments syntax in `ActionController::TestCase` and
|
||||
`ActionDispatch::Integration` HTTP request methods
|
||||
`ActionDispatch::Integration` HTTP request methods.
|
||||
|
||||
New syntax example:
|
||||
Example:
|
||||
|
||||
post :create, params: { y: x }, session: { a: 'b' }
|
||||
get :view, params: { id: 1 }
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
*Kir Shatrov*
|
||||
|
||||
* Preserve default url options when generating URLs
|
||||
* Preserve default url options when generating URLs.
|
||||
|
||||
Fixes an issue that would cause default_url_options to be lost when
|
||||
generating URLs with fewer positional arguments than parameters in the
|
||||
@ -47,6 +47,7 @@
|
||||
* Allow you to pass `prepend: false` to protect_from_forgery to have the
|
||||
verification callback appended instead of prepended to the chain.
|
||||
This allows you to let the verification step depend on prior callbacks.
|
||||
|
||||
Example:
|
||||
|
||||
class ApplicationController < ActionController::Base
|
||||
@ -143,7 +144,7 @@
|
||||
|
||||
*Travis Grathwell*
|
||||
|
||||
* Stop converting empty arrays in `params` to `nil`
|
||||
* Stop converting empty arrays in `params` to `nil`.
|
||||
|
||||
This behaviour was introduced in response to CVE-2012-2660, CVE-2012-2694
|
||||
and CVE-2013-0155
|
||||
|
@ -2,48 +2,46 @@
|
||||
will now raise `ActiveModel::AttributeAssignment::UnknownAttributeError` instead of
|
||||
`NoMethodError`
|
||||
|
||||
```ruby
|
||||
User.new(foo: 'some value')
|
||||
# => ActiveModel::AttributeAssignment::UnknownAttributeError: unknown attribute 'foo' for User.
|
||||
```
|
||||
Example:
|
||||
|
||||
User.new(foo: 'some value')
|
||||
# => ActiveModel::AttributeAssignment::UnknownAttributeError: unknown attribute 'foo' for User.
|
||||
|
||||
*Eugene Gilburg*
|
||||
|
||||
* Extracted `ActiveRecord::AttributeAssignment` to `ActiveModel::AttributeAssignment`
|
||||
allowing to use it for any object as an includable module
|
||||
allowing to use it for any object as an includable module.
|
||||
|
||||
``` ruby
|
||||
class Cat
|
||||
include ActiveModel::AttributeAssignment
|
||||
attr_accessor :name, :status
|
||||
end
|
||||
Example:
|
||||
|
||||
cat = Cat.new
|
||||
cat.assign_attributes(name: "Gorby", status: "yawning")
|
||||
cat.name # => 'Gorby'
|
||||
cat.status => 'yawning'
|
||||
cat.assign_attributes(status: "sleeping")
|
||||
cat.name # => 'Gorby'
|
||||
cat.status => 'sleeping'
|
||||
```
|
||||
class Cat
|
||||
include ActiveModel::AttributeAssignment
|
||||
attr_accessor :name, :status
|
||||
end
|
||||
|
||||
cat = Cat.new
|
||||
cat.assign_attributes(name: "Gorby", status: "yawning")
|
||||
cat.name # => 'Gorby'
|
||||
cat.status => 'yawning'
|
||||
cat.assign_attributes(status: "sleeping")
|
||||
cat.name # => 'Gorby'
|
||||
cat.status => 'sleeping'
|
||||
|
||||
*Bogdan Gusiev*
|
||||
|
||||
* Add `ActiveModel::Errors#details`
|
||||
|
||||
To be able to return type of used validator, one can now call `details`
|
||||
on Errors instance:
|
||||
on errors instance.
|
||||
|
||||
```ruby
|
||||
class User < ActiveRecord::Base
|
||||
validates :name, presence: true
|
||||
end
|
||||
```
|
||||
Example:
|
||||
|
||||
```ruby
|
||||
user = User.new; user.valid?; user.errors.details
|
||||
=> {name: [{error: :blank}]}
|
||||
```
|
||||
class User < ActiveRecord::Base
|
||||
validates :name, presence: true
|
||||
end
|
||||
|
||||
user = User.new; user.valid?; user.errors.details
|
||||
=> {name: [{error: :blank}]}
|
||||
|
||||
*Wojciech Wnętrzak*
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
* Fixed ActiveRecord::Relation#group method when argument is SQL reserved key word:
|
||||
|
||||
SplitTest.group(:key).count
|
||||
Property.group(:value).count
|
||||
Example:
|
||||
|
||||
SplitTest.group(:key).count
|
||||
Property.group(:value).count
|
||||
|
||||
*Bogdan Gusiev*
|
||||
|
||||
@ -86,7 +88,7 @@
|
||||
A deprecation warning will be emitted if you have a `:time` column, and have
|
||||
not explicitly opted out.
|
||||
|
||||
Fixes #3145
|
||||
Fixes #3145.
|
||||
|
||||
*Sean Griffin*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user