Add inverse_of to associations

[#56005352]

Without the inverse_of option, building a has_many element did not
properly set the belongs_to association.