What we were talking about, was, the idea that models and views
shouldn't really interact; rather, we could define an interface between
the model and the view, similar to the way Liquid templates use a Drop
to limit the fields to which you have access.
The idea being, you could turn around the helpers so you're doing
<%= @user.link %> rather than <%= link_to @user.name,
user_path(@user) %> or whatever it is.
Hmm, I missed the specifics of that conversation, but here are some
I like the idea of turning the helpers "around" like you mentioned, but
the example you gave seems to go a little too far, i.e. now we're
putting view logic in the model, even if it's done with a mixin.
Perhaps a better (?) separation would be to leave link_to as a "view
helper" and then #path just becomes a method on AR::Base (or wherever):
<%= link_to @user.name, @user.path %>
I guess the problem is that it's not *that* much less code, but feels
ever so slightly cleaner (and DRY) to me, compared to:
<%= link_to @user.name, user_path(@user) %>
Then again I don't know what anyone has planned along these lines.