Month: November 2015

Validate a checkbox in Rails

If you have to validate a checkbox in your frontend that is part of your model (e.g. acceptregulation) the following snippet works like charm.


Display html in Rails form from l18n/translations

To display html without html encoding you have to use the .html_safe method for the translation: