Hello,
Don't know if this helps but I'm doing something like this at the
moment...
# file app/filters/url_filters.rb
module UrlFilters
include ActionView::Helpers::TagHelper
include ActionView::Helpers::AssetTagHelper
def link_to_post(link_text, post)
link_for(link_text, post_path(post))
end
def post_path(post)
url_for :controller => 'posts', :action => 'show', :id =>
post.id
end
def link_for(link_text, url)
content_tag :a, link_text, { :href => url, :title => link_text }
end
private
def url_for(options = {})
controller.url_for options
end
def controller()
@context.registers[:controller]
end
end
##
Additionally, I'm adding the filters in an initializer and passing the
current controller as a register to the liquid templates. It's a long
winded approach but I'm new to ruby/rails and it works for now :)
Nearly there with an approach that allows you to use the autogenerated
restful path/url helpers though.
fturtle