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 |
||
---|---|---|
.. | ||
actionpack | ||
activerecord | ||
fixtures | ||
lib | ||
template | ||
ujs | ||
abstract_unit.rb | ||
active_record_unit.rb |