Remko,

As long as your monkey-patch lives only for the scope of your rake task, it should be fine. In the future, this will not be an issue because Rails 2.2(?) made the relative_url_root a property of ActionController::Base rather than the request.

Sean

Remko Steenstra wrote:
Hi all,

I am working on an extension that needs to render pages as part of a
rake task. This works, but I have run into a problem when using <r:url>
in my content. Because there is no request object, the relative_url_for
method in standard_tags.rb throws an Exception. As a workaround, I've
monkey-patched my Radiant (see below).

Is there a better solution? Am I missing something obvious?

Thanks!
Remko

standard_tags.rb:
def relative_url_for(url, request)
 root = request.relative_url_root rescue ''
 File.join(root, url)
end



_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to