fix output safety issue with select options
add AS::SafeBuffer#clone_empty
use AS::SafeBuffer#clone_empty for flushing the output_buffer
delete vulnerable AS::SafeBuffer#[]
Fix type_to_sql with text and limit on mysql/mysql2. Fix GH #3931.
Merge pull request #5206 from kennyj/fix_5173-32

[3-2-stable] Fix type_to_sql with text and limit on mysql/mysql2. Fix GH #3931
Ensure [] respects the status of the buffer.
Merge branch '3-2-stable-security' into 3-2-2

* 3-2-stable-security:
  Ensure [] respects the status of the buffer.
  delete vulnerable AS::SafeBuffer#[]
  use AS::SafeBuffer#clone_empty for flushing the output_buffer
  add AS::SafeBuffer#clone_empty
  fix output safety issue with select options
bumping to 3.2.2
Merge branch '3-2-2' into 3-2-stable

* 3-2-2:
  bumping to 3.2.2
  Ensure [] respects the status of the buffer.
  Merge pull request #4834 from sskirby/fix_usage_of_psql_in_db_test_prepare
  Merge pull request #5084 from johndouthat/patch-1
  updating RAILS_VERSION
  delete vulnerable AS::SafeBuffer#[]
  use AS::SafeBuffer#clone_empty for flushing the output_buffer
  add AS::SafeBuffer#clone_empty
  fix output safety issue with select options
revert setting NOT NULL constraints in add_timestamps

Commit 3dbedd2 added NOT NULL constraints both to table
creation and modification. For creation the new default
makes sense, but the generic situation for changing a
table is that there exist records. Those records have
no creation or modification timestamps, and in the
general case you don't even know them, so when updating
a table these constraints are not going to work. See
a bug report for this use case in #3334.
Fix #5238, rendered_format is not set when template is not rendered
Stop SafeBuffer#clone_empty from issuing warnings

Logic in clone_empty method was dealing with old @dirty variable, which
has changed by @html_safe in this commit:
https://github.com/rails/rails/commit/139963c99a955520db6373343662e55f4d16dcd1

This was issuing a "not initialized variable" warning - related to:
https://github.com/rails/rails/pull/5237

The logic applied by this method is already handled by the [] override,
so there is no need to reset the variable here.
Add CHANGELOG entry
only log an error if there is a logger. fixes #5226

Conflicts:

	activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
Turn off verbose mode of rack-cache, we still have X-Rack-Cache to check that info

Closes #5245
CSS fix for guides. Closing #5028 [ci skip]

In Ubuntu Chrome, in the last lines of code blocks, the underscore isn't
visible. Increasing the line height slightly seems to fix this. This
problem doesn't exist in Firefox even on Ubuntu. Too lazy to test in
any other OS-browser combo :)
fix associations when using per class databases

would get ConnectionNotEstablished error because it always tried to use
ActiveRecord::Base's connection, even though it should be using the connection
of the model whose context we're operating in
Only run binary type cast test with encode! on Ruby 1.9
Whitelist all attribute assignment by default.

Change the default for newly generated applications to whitelist all attribute assignment.  Also update the generated model classes so users are reminded of the importance of attr_accessible.