access ActionView helpers from inside the Model
问题 I have a simple template system which calls a show_me method defined inside different classes of my model (kinda Widgets) when rendering a template. These widgets originally returned the html as a string. So in my erb I have somethink like this. <% @template.widgets.each do |widget| %> <%= widget.show_me %> <% end %> As the views of the widgets became more complex I start using partials to render them, calling the ActionView::Base render method from inside my widgets (please don't throw up