h
/ html_escape
don’t work within a controller method.
I know, it’s for views. (Or was — haven’t done much Rails since v2.3). But I’m just building an eensy-weensy string and want to use this method in my controller.
So how can I escape HTML from within a controller method?