I''m a little confused as to where I should put a permalink method
for my blog. It needs to available in the controller (think trackbacks
and APIs) as well as the templates.
The problem is that if I define the method in the controller, I don''t
have access to link_to, which is an AV method. If I define the
method as a helper, it isn''t available in the controller.
The method should look something like this:
def permalink (text, entry)
link_to text, :slug => entry.slug ... etc.
end
How do I solve this particular catch-22?
Thanks for any insights.
--
Regards,
Stian Grytøyr