Merge pull request #18251 from tjgrathwell/fix-polymorphic-routes-to-model

Fix form_for to work with objects that implement to_model

Conflicts:
	actionpack/CHANGELOG.md