Print out a meaningful error when ActiveRecord::ReadOnlyRecord is raised

Currently, there is no messages which get printed out. Convoluted system
may have hooks that create other objects in which case we only fail with
no messages. This commit changes this information allowing you to know
which object is the one that actually raised the error.
Merge pull request #17541 from OpenSourceProjects/meaninful_message

Print out a meaningful error when ActiveRecord::ReadOnlyRecord is raised