Module: ActionController::Base::DeprecatedBehavior
- Included in:
- ActionController::Base
- Defined in:
- actionpack/lib/action_controller/deprecated/base.rb
Overview
Deprecated methods. Wrap them in a module so they can be overwritten by plugins (like the verify method.)
Instance Method Summary (collapse)
- - (Object) allow_concurrency
- - (Object) allow_concurrency=(value)
- - (Object) consider_all_requests_local
- - (Object) consider_all_requests_local=(value)
- - (Object) cookie_verifier_secret
- - (Object) cookie_verifier_secret=(value)
- - (Object) exempt_from_layout
-
- (Object) filter_parameter_logging(*args, &block)
This method has been moved to ActionDispatch::Request.filter_parameters.
- - (Object) ip_spoofing_check
- - (Object) ip_spoofing_check=(value)
- - (Object) relative_url_root
- - (Object) relative_url_root=
-
- (Object) resource_action_separator
Controls the resource action separator.
- - (Object) resource_action_separator=(val)
- - (Object) session(*args)
- - (Object) session=(value)
- - (Object) trusted_proxies
- - (Object) trusted_proxies=(value)
- - (Object) use_accept_header
- - (Object) use_accept_header=(val)
-
- (Object) verify(*args)
This was moved to a plugin.
Instance Method Details
- (Object) allow_concurrency
28 29 30 31 32 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 28 def allow_concurrency ActiveSupport::Deprecation.warn "ActionController::Base.allow_concurrency is deprecated, " << "use Rails.application.config.allow_concurrency instead", caller Rails.application.config.allow_concurrency end |
- (Object) allow_concurrency=(value)
34 35 36 37 38 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 34 def allow_concurrency=(value) ActiveSupport::Deprecation.warn "ActionController::Base.allow_concurrency= is deprecated. " << "Please configure it on your application with config.allow_concurrency=", caller Rails.application.config.allow_concurrency = value end |
- (Object) consider_all_requests_local
16 17 18 19 20 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 16 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", caller Rails.application.config.consider_all_requests_local end |
- (Object) consider_all_requests_local=(value)
22 23 24 25 26 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 22 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=", caller Rails.application.config.consider_all_requests_local = value end |
- (Object) cookie_verifier_secret
57 58 59 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 57 def ActiveSupport::Deprecation.warn "ActionController::Base.cookie_verifier_secret is deprecated.", caller end |
- (Object) cookie_verifier_secret=(value)
52 53 54 55 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 52 def (value) ActiveSupport::Deprecation.warn "ActionController::Base.cookie_verifier_secret= is deprecated. " << "Please configure it on your application with config.secret_token=", caller end |
- (Object) exempt_from_layout
132 133 134 135 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 132 def exempt_from_layout(*) ActiveSupport::Deprecation.warn "exempt_from_layout is no longer needed, because layouts in Rails 3 " \ "are restricted to the content-type of the template that was rendered.", caller end |
- (Object) filter_parameter_logging(*args, &block)
This method has been moved to ActionDispatch::Request.filter_parameters
118 119 120 121 122 123 124 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 118 def filter_parameter_logging(*args, &block) ActiveSupport::Deprecation.warn("Setting filter_parameter_logging in ActionController is deprecated and has no longer effect, please set 'config.filter_parameters' in config/application.rb instead", caller) filter = Rails.application.config.filter_parameters filter.concat(args) filter << block if block filter end |
- (Object) ip_spoofing_check
46 47 48 49 50 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 46 def ip_spoofing_check 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_dispatch.ip_spoofing_check end |
- (Object) ip_spoofing_check=(value)
40 41 42 43 44 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 40 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=", caller Rails.application.config.action_dispatch.ip_spoofing_check = value end |
- (Object) relative_url_root
6 7 8 9 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 6 def relative_url_root ActiveSupport::Deprecation.warn "ActionController::Base.relative_url_root is ineffective. " << "Please stop using it.", caller end |
- (Object) relative_url_root=
11 12 13 14 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 11 def relative_url_root= ActiveSupport::Deprecation.warn "ActionController::Base.relative_url_root= is ineffective. " << "Please stop using it.", caller end |
- (Object) resource_action_separator
Controls the resource action separator
98 99 100 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 98 def resource_action_separator @resource_action_separator ||= "/" end |
- (Object) resource_action_separator=(val)
102 103 104 105 106 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 102 def resource_action_separator=(val) ActiveSupport::Deprecation.warn "ActionController::Base.resource_action_separator is deprecated and only " \ "works with the deprecated router DSL." @resource_action_separator = val end |
- (Object) session(*args)
73 74 75 76 77 78 79 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 73 def session(*args) ActiveSupport::Deprecation.warn( "Disabling sessions for a single controller has been deprecated. " + "Sessions are now lazy loaded. So if you don't access them, " + "consider them off. You can still modify the session cookie " + "options with request.session_options.", caller) end |
- (Object) session=(value)
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 81 def session=(value) ActiveSupport::Deprecation.warn "ActionController::Base.session= is deprecated. " << "Please configure it on your application with config.session_store :cookie_store, :key => '....'", caller if secret = value.delete(:secret) Rails.application.config.secret_token = secret end if value.delete(:disabled) Rails.application.config.session_store :disabled else store = Rails.application.config.session_store Rails.application.config.session_store store, value end end |
- (Object) trusted_proxies
67 68 69 70 71 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 67 def trusted_proxies ActiveSupport::Deprecation.warn "ActionController::Base.trusted_proxies is deprecated. " << "Configuring trusted_proxies on the application configures a middleware.", caller Rails.application.config.action_dispatch.ip_spoofing_check = value end |
- (Object) trusted_proxies=(value)
61 62 63 64 65 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 61 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=", caller Rails.application.config.action_dispatch.ip_spoofing_check = value end |
- (Object) use_accept_header
108 109 110 111 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 108 def use_accept_header ActiveSupport::Deprecation.warn "ActionController::Base.use_accept_header doesn't do anything anymore. " \ "The accept header is always taken into account." end |
- (Object) use_accept_header=(val)
113 114 115 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 113 def use_accept_header=(val) use_accept_header end |
- (Object) verify(*args)
This was moved to a plugin
127 128 129 130 |
# File 'actionpack/lib/action_controller/deprecated/base.rb', line 127 def verify(*args) ActiveSupport::Deprecation.warn "verify was removed from Rails and is now available as a plugin. " \ "Please install it with `rails plugin install git://github.com/rails/verification.git`.", caller end |