Fix STI scopes using benolee's suggestion. Fixes #11939
pass the extra params to the rack test environment so that routes with block constraints have access
on SchemaCache use the connection getter instead of the obj given
Merge pull request #12176 from arthurnn/ar32_schema_cache

on SchemaCache use the connection getter instead of the obj given
Merge pull request #9368 from CrowdFlower/3-2-stable

PR #5219 backported to 3-2
Fix FinderMethods#last unscoped primary key

Fixes table.joins(:relation).last(N) breaking on sqlite

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/finder_test.rb
Merge pull request #12196 from h-lame/fix-activesupport-cache-filestore-cleanup

Fix FileStore#cleanup to no longer rely on missing each_key method
Conflicts:
	activesupport/CHANGELOG.md
	activesupport/test/caching_test.rb
Merge pull request #12359 from arthurnn/inverse_on_callbacks

Make sure inverse_of is visible on the has_many callbacks
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/models/company.rb
on tests: dont always touch firm on validate
Merge pull request #12364 from arthurnn/test_fix_validate

Fix query counters when testing with IdentityMap on 3.2
fix inverse_of when find_or_initialize_by_*

inverse_of relation was not being set when calling find_or_initialize_by_ and the entry was
found on the db.
Use Ruby 1.8 hash syntax
Merge pull request #12375 from arthurnn/inverse_after_find_or_initialize

Inverse after find or initialize
Move set_inverse_instance to association.build_record

[fixes #10371]
Merge pull request #12413 from arthurnn/inverse_of_on_build

Inverse of on build
Remove the use of String#% when formatting durations in log messages

This avoids potential format string vulnerabilities where user-provided
data is interpolated into the log message before String#% is called.
make sure both headers are set before checking for ip spoofing
Merge pull request #12410 from tamird/fix-ip-spoof-errors

Fix ip spoof errors
Merge branch '3-2-stable' into 3-2-sec

* 3-2-stable:
  make sure both headers are set before checking for ip spoofing
  Move set_inverse_instance to association.build_record
Merge pull request #12084 from Ben-M/3-2-stable

Fix STI scopes using benolee's suggestion. Fixes #11939