Use helper methods in controller? (sanitize)


#1

Hi,
I want to use the method sanitize() to clean up some user input before I
save it to the db. sanitize() is a helper method, so it is only usable
in templates, right?
So how can I use helper methods in the controller, or why should I not?
I could build a template like “<%=sanitize(input)-%>” and use
render_to_string, but that seems pretty hackish.
Or I could sanitize every time I output the data in a template, but that
seems like a waste of processing power.


Martin S.
removed_email_address@domain.invalid
Tel: 0 36 43 - 41 41 56
http://www.uni-weimar.de/~scheffl2
icq: 137729435