diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-17 17:02:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-17 17:02:55 +0000 |
commit | d85f73a30d48b3472346fb712106e6d5f4403278 (patch) | |
tree | 35d9205b3bf1da3c4e1cc9fc7699f798395d4702 /config/initializers | |
parent | 3ea8b706978b490fc54cde8e14dcde2a748dec1a (diff) | |
download | redmine-d85f73a30d48b3472346fb712106e6d5f4403278.tar.gz redmine-d85f73a30d48b3472346fb712106e6d5f4403278.zip |
Upgrade to Rails 4.2.0 (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13892 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/10-patches.rb | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index e01b4c2d7..5c2f913b0 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -146,6 +146,16 @@ module ActionMailer end end +# #deliver is deprecated in Rails 4.2 +# Prevents massive deprecation warnings +module ActionMailer + class MessageDelivery < Delegator + def deliver + deliver_now + end + end +end + module ActionController module MimeResponds class Collector @@ -163,32 +173,8 @@ module ActionController # TODO: remove it in a later version def self.session=(*args) $stderr.puts "Please remove config/initializers/session_store.rb and run `rake generate_secret_token`.\n" + - "Setting the session secret with ActionController.session= is no longer supported in Rails 3." + "Setting the session secret with ActionController.session= is no longer supported." exit 1 end end end - -if Rails::VERSION::MAJOR < 4 && RUBY_VERSION >= "2.1" - module ActiveSupport - class HashWithIndifferentAccess - def select(*args, &block) - dup.tap { |hash| hash.select!(*args, &block) } - end - - def reject(*args, &block) - dup.tap { |hash| hash.reject!(*args, &block) } - end - end - - class OrderedHash - def select(*args, &block) - dup.tap { |hash| hash.select!(*args, &block) } - end - - def reject(*args, &block) - dup.tap { |hash| hash.reject!(*args, &block) } - end - end - end -end |