make sure both headers are set before checking for ip spoofing
Merge branch 'fix-ip-spoof-errors' of https://github.com/tamird/rails into tamird-fix-ip-spoof-errors
Add changlog entry for #10844
Make `.next_migration_number` reusable for third party AR generators.
Merge pull request #12407 from senny/extract_next_migration_number_into_module

Extract `.next_migration_number` into module for third party generators.
change the savepoint interface to allow passing the name.
extract adapter savepoint implementations into `abstract/savepoints.rb`.
require_dependency should allow Pathname-like objects, not just String
Merge pull request #12412 from bf4/allow_pathname_for_require_dependency

Allow Pathname for require dependency
registers 0b0beb7 in the CHANGELOG [ci skip]
revises the docs of require_dependency [ci skip]
guides: configuring: fixing explanation of :after_initialize hook

:after_initialize runs after config/initializers, not before
Merge pull request #12416 from sepastian/guides_configuring_initialization_hooks

guides: configuring: fixing explanation of :after_initialize hook [ci skip]
Update AR reload doc for the case of manually set primary key attribute [ci skip]
Merge pull request #12418 from makaroni4/fix/ar_reload_doc_12101

Update AR reload doc for the case of manually set primary key attribute [ci skip]
improving `reload` doc wording. #12418 [ci skip]
Add `#any_of` query method to active_record

This method is inspired by [any_of from
mongoid](http://two.mongoid.org/docs/querying/criteria.html#any_of).

It is hooked on `WhereChain`, just like `#not`, and allows to compute an
`OR` like query that leverages AR's `#where` syntax:

    manual_removal = User.where(id: params[:users][:destroy_ids])
    users = User.where.any_of(manual_removal, "email like '%@example.com'", {banned: true}).destroy_all

It can be used anywhere `#where` is expected to work :

    manual_removal = User.where(id: params[:users][:destroy_ids])
    User.where.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    @company.users.where.any_of(manual_removal, "email like '%@example.com'", {banned: true})
    User.where(offline: false).where.any_of( manual_removal, "email like '%@example.com'", {banned: true})

Its main purpose is to both :

* remove the need to write a sql string when we want an `OR`
* allow to write dynamic `OR` queries, which would be a pain with a string

There's also a negative version, `#none_of`. This will return all active
users :

    banned_users = User.where(banned: true)
    unconfirmed_users = User.where("confirmed_at IS NULL")
    active_users = User.where.none_of(banned_users, unconfirmed_users)