2006-04-24

Dynamic template_root Revisited

It was simplier than I thought:


@response.template.base_path = "#{Site.current_site.path}"
render(:action => template)

The only important thing is that base_path is absolute, so it is best to use RAILS_ROOT as base.