Guest User

Untitled

a guest
Jan 22nd, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. ActionMailer::Base.class_eval do
  2. def mail_with_prefix(headers={}, &block)
  3. unless Rails.env.production?
  4. headers[:subject] = "[#{Rails.env.upcase}] " + (headers[:subject] || '')
  5. end
  6. mail_without_prefix(headers, &block)
  7. end
  8.  
  9. alias_method_chain :mail, :prefix
  10. end
Add Comment
Please, Sign In to add comment