Using view helpers from a controller

Hi,

I want to access a view helper from a controller.

(Of course, you all want to know why??? – See below.)

To be specific, I want to access methods such as
ActionView::Helpers::FormTagHelper – form_tag and text_field_tag

from either a controller or from a new class (in models? or lib?).
If I create the new class then that class’s methods need to also be able
to access the ActiveRecord dbms classes. What class would the new class
inherit from? Mix in from?

Why: I’m using the liquid template system to enable people to safely
template their versions of my application. So I need to pass the various
form tags of the screen to the liquid template. Thus I will not be using
ActiveView rhtml etc to render. I could make a zillion calls (one for
each element of the form) to render_to_string but that would not be
efficient or workable. (A zillion partials.)

Thank you for your helpful comments.

Regards,

Larry