Forum: Ruby on Rails AppMailer and McCray's theme generator

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2f6686bd2c6bb633a1cbf7b5a73c8491?d=identicon&s=25 Mickael Faivre-Macon (micktaiwan)
on 2006-05-25 21:03
(Received via mailing list)
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:in
`render'
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:in
`render_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:in
`initialize'
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:in
`method_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


[...]
2f6686bd2c6bb633a1cbf7b5a73c8491?d=identicon&s=25 Mickael Faivre-Macon (micktaiwan)
on 2006-05-30 13:23
(Received via mailing list)
Any ideas ?
Mickael.
This topic is locked and can not be replied to.