mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
use tap with block parameter
This commit is contained in:
parent
f71467ac60
commit
02902e00ab
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ module Rails
|
|||
alias inspect to_s
|
||||
|
||||
def to_html
|
||||
(table = '<table>').tap do
|
||||
'<table>'.tap do |table|
|
||||
properties.each do |(name, value)|
|
||||
table << %(<tr><td class="name">#{CGI.escapeHTML(name.to_s)}</td>)
|
||||
formatted_value = if value.kind_of?(Array)
|
||||
|
|
Loading…
Reference in a new issue