AppMailer and McCray's theme generator


#1

Hi,

I am using Matt McCray’s theme generator.
http://rubyforge.org/projects/theme-generator/

Everything works fine, but rendering an action in a controller using
the AppMailer raises this:
undefined method `current_theme’ for #AppMailer:0x39df950

Is there someone who could help me ?

Thanks !
Mickael.

Traces:

#{RAILS_ROOT}/vendor/plugins/theme_support/lib/patches/actionview_ex.rb:16:in
render_file' D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_view/base.rb:267:inrender’
D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.0/lib/action_mailer/base.rb:363:in
render' D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.0/lib/action_mailer/base.rb:358:inrender_message’
D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.0/lib/action_mailer/base.rb:306:in
create!' D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.0/lib/action_mailer/base.rb:267:ininitialize’
D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
new' D:/MATech/Prog/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.0/lib/action_mailer/base.rb:227:inmethod_missing’
#{RAILS_ROOT}/app/controllers/account_controller.rb:14:in `login’

Source:

class AccountController < ApplicationController
model :user
layout ‘login’

def index
redirect_to ‘/account/login’
end

def login
case @request.method
when :post
if @session[‘user’] = User.authenticate(@params[‘user_login’],
@params[‘user_password’])
AppMailer.deliver_alert(“Login:
#{@session[‘user’][‘name’]}”,"#{@session[‘user’][‘name’]} just logged
on PTM")
flash[‘notice’] = “Login successful”
redirect_back_or_default :controller => “welcome”
else
@login = @params[‘user_login’]
@message = “Login unsuccessful”
end
end
end

[…]


#2

Any ideas ?
Mickael.