Merge pull request #9685 from dimko/patch-2

Added Date#all_week/month/quarter/year for generating date ranges
Changelog improvements [ci skip]
`connection.type_to_sql` returns a `String` for unmapped types.

Closes #13146.

This fixes an error when using:

```
change_colum :table, :column, :bigint, array: true
```
ActiveRecord migration exception message formatting
Merge branch 'master-sec'

* master-sec:
  Deep Munge the parameters for GET and POST
  Stop using i18n's built in HTML error handling.
  Ensure simple_format escapes its html attributes
  Escape the unit value provided to number_to_currency
  Only use valid mime type symbols as cache keys
Fix offset with last.

Closes #7441
Remove the escaping skip

We are generating safe strings in the paragraph, so we can escape the
tags
Merge pull request #13149 from laurocaetano/fix_offset_last

Fix offset with last.
Merge pull request #12462 from jjb/improve_ar_exception_message_formatting

Improve formatting of ActiveRecord migration exception messages
Improve AR changelog, add entry for migration error improvements #12462 [ci skip]
Change deep_munge call to avoid deprecation warning
Rename variable that holds whether or not the class should validate a float number
Refactor to avoid earlier returns
Stop using local variables everywhere, make use of the reader
Avoid a hash creation since defaults is a new hash already
No need for #tap
Remove useless empty string
Make both conversion methods work similarly

The conversion without area code already changed the passed number in
place, so change the other method to do the same.
Change delimiter check order: first check if it is present

This reads a lot better, and we won't need to try start_with? for blank
delimiters.

Also rename method name to read better.
Remove earlier return in favor of conditional