I am using a presenter for a view in rails to display data which is saved in a yml file. (i18n gem)
This is the controller-
class DocumentsController <
the content_for helper method should not be used in your model as this violates the MVC pattern.
if you must use it, though this is not reccomended, you can add this at the bottom of your model.
def helpers
ActionController::Base.helpers
end
Then to call content_for you would use
class DocumentPresenter
def viewname
helpers.content_for :secondary_nav_title do
t('Documents')
end
end
end