store join parts in a tree
generate the association hash from the top down

This prevents us from walking back up the parent tree once for each
leaf.
do not convert the tree to a list just for the first node
walk the tree rather than generating a hash and walking it
rename the variable to make more sense with a tree
reduce number of comparisons and array allocations

Just inspecting the children nodes will reduce the number of comparisons
we have to do (since it is limited to the child size)
parent is guaranteed to be the same

since we are searching a tree, the current level should be consistent,
so we don't have to inspect the parent class / table
we do not need to to_s the name all the time
we will always detect the same node, so just pass the node in
eliminate function that is only used in one place
names are guaranteed to be symbols
Define the association extensions without need to have a builder
instance
observers are not part of ActiveModel [ci skip]
Typo fix [ci skip]

Fixing the typo which is formed a not required link.  Check
here http://api.rubyonrails.org/classes/ActionController/Base.html
under paramters section
keeping it under tt tag

gets reverted here ec8ef1e1055c4e1598da13f49d30261f07f4a9b4
Using flat_map instead of map and flatten

original commit 8998441967a8cfc6e4302c29664ab9d0acd77704

Reverted here ec8ef1e1055c4e1598da13f49d30261f07f4a9b4
Minor align BR tags with HTML void - with reference to the generators code change - https://github.com/rails/rails/commit/f038d4cc5fe1ac21f92c7e32c61ff85a0c816f3f
Added ActionView in rake about [ci skip]
Merge pull request #12481 from arunagw/fixes

Few fixes which includes revert fixes
[Validations Guide] Add full stop to the end of sentence [ci skip]
Merge pull request #12482 from francisgo/patch-11

[Validations Guide] Add full stop to the end of sentence [ci skip]