fix HABTM w/out primary key errors on destruction
Make sure transaction state resets after commit

[fixes #12566]
Missing closing parenthesis.
Merge pull request #13936 from edogawaconan/fix_docs

Missing closing parenthesis. [ci skip]
`#to_param` returns `nil` if `to_key` returns `nil`. Closes #11399.

The documentation of `#to_key` (http://api.rubyonrails.org/classes/ActiveModel/Conversion.html#method-i-to_key)
states that it returns `nil` if there are no key attributes. `to_param` needs
to be aware of that fact and return `nil` as well.

Previously it raised the following exception:

```
  1) Error:
ConversionTest#test_to_param_returns_nil_if_to_key_is_nil:
NoMethodError: undefined method `join' for nil:NilClass
    /Users/senny/Projects/rails/activemodel/lib/active_model/conversion.rb:65:in `to_param'
    /Users/senny/Projects/rails/activemodel/test/cases/conversion_test.rb:34:in `block in <class:ConversionTest>'
```
Merge pull request #13899 from Fortisque/kevin/active_record_HABTM_with_belongs_to

destruction errors out on HABTM w/out primary key
docs, link MySQL manual for multi column indexes. [ci ckip].

Closes #9131.
add missing sharp [ci skip]
Merge pull request #13940 from gregmolnar/guides

add missing sharp [ci skip]
Merge pull request #13935 from arthurnn/fix_12566

Make sure transaction state resets after commit
Add CHANGELOG entry for #13935 [ci skip]
excerpt() now accepts regular expression instances as phrases.
highlight() now accepts regular expressions as well.