aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-03-03 17:08:54 -0800
committerCarl Lerche <carllerche@mac.com>2010-03-03 21:24:00 -0800
commit54302ef55bffd1a93f20f5d1ae81217b2e4149c4 (patch)
tree2ecf9c296e1f0cea6d2f9b7d5611e98a8bd0fec2 /actionpack
parent786724107c3dedaeccaae9e187458b48df472f90 (diff)
downloadrails-54302ef55bffd1a93f20f5d1ae81217b2e4149c4.tar.gz
rails-54302ef55bffd1a93f20f5d1ae81217b2e4149c4.tar.bz2
rails-54302ef55bffd1a93f20f5d1ae81217b2e4149c4.zip
Add caller to deprecation notices
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/compatibility.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb
index ab59ffc0b4..9471f36de3 100644
--- a/actionpack/lib/action_controller/metal/compatibility.rb
+++ b/actionpack/lib/action_controller/metal/compatibility.rb
@@ -70,7 +70,7 @@ module ActionController
ClassMethods.class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{option}
- ActiveSupport::Deprecation.warn #{message.inspect}
+ ActiveSupport::Deprecation.warn #{message.inspect}, caller
config.#{option}
end
RUBY
@@ -82,7 +82,7 @@ module ActionController
ClassMethods.class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{option}=(val)
- ActiveSupport::Deprecation.warn #{message.inspect}
+ ActiveSupport::Deprecation.warn #{message.inspect}, caller
config.#{option} = val
end
RUBY
@@ -109,49 +109,49 @@ module ActionController
module ClassMethods
def consider_all_requests_local
ActiveSupport::Deprecation.warn "ActionController::Base.consider_all_requests_local is deprecated, " <<
- "use Rails.application.config.consider_all_requests_local instead"
+ "use Rails.application.config.consider_all_requests_local instead", caller
Rails.application.config.consider_all_requests_local
end
def consider_all_requests_local=(value)
ActiveSupport::Deprecation.warn "ActionController::Base.consider_all_requests_local= is deprecated. " <<
- "Please configure it on your application with config.consider_all_requests_local="
+ "Please configure it on your application with config.consider_all_requests_local=", caller
Rails.application.config.consider_all_requests_local = value
end
def allow_concurrency
ActiveSupport::Deprecation.warn "ActionController::Base.allow_concurrency is deprecated, " <<
- "use Rails.application.config.allow_concurrency instead"
+ "use Rails.application.config.allow_concurrency instead", caller
Rails.application.config.allow_concurrency
end
def allow_concurrency=(value)
ActiveSupport::Deprecation.warn "ActionController::Base.allow_concurrency= is deprecated. " <<
- "Please configure it on your application with config.allow_concurrency="
+ "Please configure it on your application with config.allow_concurrency=", caller
Rails.application.config.allow_concurrency = value
end
def ip_spoofing_check=(value)
ActiveSupport::Deprecation.warn "ActionController::Base.ip_spoofing_check= is deprecated. " <<
- "Please configure it on your application with config.action_dispatch.ip_spoofing_check="
+ "Please configure it on your application with config.action_dispatch.ip_spoofing_check=", caller
Rails.application.config.action_disaptch.ip_spoofing_check = value
end
def ip_spoofing_check
- ActiveSupport::Deprecation.warn "ActionController::Base.ip_spoofing_check is deprecated. "
- "Configuring ip_spoofing_check on the application configures a middleware."
+ ActiveSupport::Deprecation.warn "ActionController::Base.ip_spoofing_check is deprecated. " <<
+ "Configuring ip_spoofing_check on the application configures a middleware.", caller
Rails.application.config.action_disaptch.ip_spoofing_check
end
def trusted_proxies=(value)
ActiveSupport::Deprecation.warn "ActionController::Base.trusted_proxies= is deprecated. " <<
- "Please configure it on your application with config.action_dispatch.trusted_proxies="
+ "Please configure it on your application with config.action_dispatch.trusted_proxies=", caller
Rails.application.config.action_dispatch.ip_spoofing_check = value
end
def trusted_proxies
ActiveSupport::Deprecation.warn "ActionController::Base.trusted_proxies is deprecated. " <<
- "Configuring trusted_proxies on the application configures a middleware."
+ "Configuring trusted_proxies on the application configures a middleware.", caller
Rails.application.config.action_dispatch.ip_spoofing_check = value
end