Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

don't use deprecated RAILS_ENV

  • Loading branch information...
commit 66b76dfbd740c45b7e78fa80f8626a52df7ae021 1 parent aca3794
@mislav mislav authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/will_paginate/deprecation.rb
View
6 lib/will_paginate/deprecation.rb
@@ -5,7 +5,7 @@ def self.debug() @debug; end
def self.debug=(value) @debug = value; end
self.debug = false
- # Choose the default warn behavior according to RAILS_ENV.
+ # Choose the default warn behavior according to Rails.env.
# Ignore deprecation warnings in production.
BEHAVIORS = {
'test' => Proc.new { |message, callstack|
@@ -27,8 +27,8 @@ def self.warn(message, callstack = caller)
end
def self.default_behavior
- if defined?(RAILS_ENV)
- BEHAVIORS[RAILS_ENV.to_s]
+ if defined?(::Rails)
+ BEHAVIORS[::Rails.env.to_s]
else
BEHAVIORS['test']
end
Please sign in to comment.
Something went wrong with that request. Please try again.