I finally figued this out.
I posted the solution here.
http://www.ajay.ws/2006/12/8/customized-subject-in-actionmailer-emails-based-on-rails-environment
AJAY
On Oct 25, 4:19 pm, "AJAY A"
<aagrawa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Folks,
>
> I need to prepend the rails environment to the subject of all outgoing
> messages in Rails. I did little dig around and find out that the real
> message is created in
> "vendor/rails/actionmailer/lib/action_mailer/base.rb" on line 467
>
> def create_mail
> m = TMail::Mail.new
>
> m.subject, = quote_any_if_necessary(charset, "#{RAILS_ENV} -
> #{subject}")
> -----
> ----
> end
>
> I have hacked this for now to add the RAILS ENV to the subject. But is
> there a clean way to do this. Like doing something in the notifier
> model override something in rails.
>
> AJAY A
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---