Problem with ActionMailer#template_root in Rails 2.1

Hi,

I’m using sms_fu plugin and after upgrading Rails to 2.1 it breaks.

There’s ActionMailer (in vendor/plugins/sms_fu/lib) that has
template_root method defined:

def template_root
“#{File.dirname(FILE)}/…/views”
end

but when trying to create an email I get the following error:
ActionView::TemplateFinder::InvalidViewPath: Unprocessed view path
found: “/myapp/vendor/plugins/sms_fu/lib/…/views”. Set your view
paths with #append_view_path, #prepend_view_path, or #view_paths=.

When I remove template root it says it can’t find a view, which is
understood. The problem is that ActionMailer doesn’t have
append_view_path method, so I’m not sure how to tell Rails to use
vendor/plugins/sms_fu/views as well.

Any ideas how to fix it?

On Aug 14, 10:57 am, szimek [email protected] wrote:

Any ideas how to fix it?
Just found out that the plugin was updated to be compatible with Rails
2.1 :slight_smile: