Custom formatting in validation messages

The interesting thing is Rails models are responsible for validation messages, yet string messages are view context specific. When validation error messages occur, sometimes I want to give the user a URL to fix the issue.

In the past, I’ve had the model validation code call Draper Decorator methods to create the proper validation message. This works fine so long as there’s one consumer of the validation, the Rails web app. This is not ideal in the general case.