discourse/config/initializers/00-rails-master-polyfills.rb
Arthur Neves 439d0d2e37
Check Rails.version instead of ENV
Like that we can have code that works on multiple Rails versions, and we
dont need to mix a new method on Kernel.
Also, this makes easier to have multiple versions.
For instance, before master was 4.2, which is not the case anymore, so
on the code we should check versions and not Environment variables
2015-04-28 22:27:47 -04:00

6 lines
142 B
Ruby

if Rails.version < "4.2.0"
class Mail::Message
alias_method :deliver_now, :deliver
alias_method :deliver_now!, :deliver!
end
end