Forum: Ruby on Rails More questions re: Presenter pattern & ActionView

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
818739b9b97c1a758faa92ad84e8e435?d=identicon&s=25 Davis Frank (dwfrank)
on 2007-05-06 02:13
(Received via mailing list)
We've been playing with the Presenter pattern a bit (as I asked about
a few weeks ago) and now better understand the limitations without
hacking deep into Rails.

We're sticking closely with Jay Fields' thoughts:

But since a Presenter isn't an ActionView, we wind up with ERb that
looks like this (from our Atom feed generator):

<%= @presenter.make_tag_URI(url_for(@presenter.entry)) %>

instead of something nicer like this:

<%= @presenter.entry_id %>

So what we want is to call ActionView helpers inside our Presenter
methods.  Thoughts on how to do this?  Should we be making our
Presenters subclasses of ActionView?  Is there some other "down in the
guts" way we should pursue?

We've looked at Simply Presentable and it seems to have the same

This topic is locked and can not be replied to.