method
handle_deprecated_escape_options
Ruby on Rails latest stable (v7.1.3.2)
-
0 notes -
Class: TagBuilder
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7 (0)
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
handle_deprecated_escape_options(options)
private
Hide source
# File actionview/lib/action_view/helpers/tag_helper.rb, line 152 def handle_deprecated_escape_options(options) # The option :escape_attributes has been merged into the options hash to be # able to warn when it is used, so we need to handle default values here. escape_option_provided = options.has_key?(:escape) escape_attributes_option_provided = options.has_key?(:escape_attributes) if escape_attributes_option_provided ActiveSupport::Deprecation.warn(<<~MSG) Use of the option :escape_attributes is deprecated. It currently escapes both names and values of tags and attributes and it is equivalent to :escape. If any of them are enabled, the escaping is fully enabled. MSG end return true unless escape_option_provided || escape_attributes_option_provided escape_option = options.delete(:escape) escape_attributes_option = options.delete(:escape_attributes) escape_option || escape_attributes_option end