Rely on backticks instead of tt tags [ci skip]

Since the language in code blocks is inferred, if the code contains tt
tags, the block will be parsed as XML for instance while it is Ruby.
Updated the cookie docs to use the safer JSON.{generate,parse}

cc @senny
Add test case for autosave HasMany with accepts_nested_attributes.

It should not save the parent record when the nested attributes are
invalid.

Test case to cover #8194.
Merge pull request #13974 from laurocaetano/test_case_for_autosave_with_accepts_nested_attributes

Add test case for autosave association with nested attributes.
named scopes evaluated with instance_eval. ScopeRegistry uses class instead of base_class