mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
af6f4be040
Prior to this change, the following call raises: ```ruby with_options(id: "with-options") { |t| t.p "content" } ``` The `ActionView::Helpers::TagHelper::TagBuilder` implementation relies on `method_missing` to dispatch calls to `tag_string` where the missing method name is the resulting element's tagName. Unfortunately, [`Kernel#p` already exists][Kernel#p] and is invoked before `method_missing` can intervene. This commit rectifies this by declaring `TagBuilder#p` and overriding the existent `#p` instance method. [Kernel#p]: https://ruby-doc.org/core-2.7.2/Kernel.html#method-i-p |
||
---|---|---|
.. | ||
tags | ||
active_model_helper.rb | ||
asset_tag_helper.rb | ||
asset_url_helper.rb | ||
atom_feed_helper.rb | ||
cache_helper.rb | ||
capture_helper.rb | ||
controller_helper.rb | ||
csp_helper.rb | ||
csrf_helper.rb | ||
date_helper.rb | ||
debug_helper.rb | ||
form_helper.rb | ||
form_options_helper.rb | ||
form_tag_helper.rb | ||
javascript_helper.rb | ||
number_helper.rb | ||
output_safety_helper.rb | ||
rendering_helper.rb | ||
sanitize_helper.rb | ||
tag_helper.rb | ||
tags.rb | ||
text_helper.rb | ||
translation_helper.rb | ||
url_helper.rb |