Logo
Explore Help
Sign In
IntenseWebs/discourse
3
0
Fork 0
You've already forked discourse
mirror of https://github.com/discourse/discourse.git synced 2025-02-25 18:55:32 -06:00
Code Issues Packages Projects Releases Wiki Activity
Files
3840c50083571abc2cf8d3c5ba76ea4503e83b7e
discourse/config/initializers/000-rails-master-polyfills.rb

7 lines
142 B
Ruby
Raw Normal View History

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-24 16:22:24 -04:00
if Rails.version < "4.2.0"
class Mail::Message
alias_method :deliver_now, :deliver
alias_method :deliver_now!, :deliver!
end
Avoid a deprecation warning by poly-filling #deliver_now and #deliver_now
2014-10-15 00:04:47 -07:00
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 126ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API