2011-03-03 79 views
0
class ForumMailer < ActionMailer::Base 

    def new_post(user,post) 
    @subject  = "New post on #{post.topic.title} from #{SITE_NAME}" 
    @recipients  = user.profile.email 
    @body['user'] = user 
    @body['post'] = post 
    @from   = MAILER_FROM_ADDRESS 
    @sent_on  = Time.new 
    @content_type = "text/html" 

    end 
end 

請幫我轉換這個Rails的2.xx的代碼到Rails的3.xxRails的2到Rails 3的轉換

+1

你有什麼已經試過?你有沒有成功看過Rails 3中的郵件代碼? – 2011-03-03 20:57:25

回答