Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ActionMailer::Base.class_eval do
- def mail_with_prefix(headers={}, &block)
- unless Rails.env.production?
- headers[:subject] = "[#{Rails.env.upcase}] " + (headers[:subject] || '')
- end
- mail_without_prefix(headers, &block)
- end
- alias_method_chain :mail, :prefix
- end
Add Comment
Please, Sign In to add comment