address=嘎嘎嘎啊啊啊aaadd zip=0 contact_name=多对多 contact_phone=ss在 erb中 用rails 代码取出所有value值并合在一起
你可以使用<%= %>标签来输出所有value值并合在一起。下面是一个示例代码:
<% hash = {"address"=>"嘎嘎嘎啊啊啊aaadd", "zip"=>0, "contact_name"=>"多对多", "contact_phone"=>"ss"} %>
<%= hash.values.join("") %>
这将输出:"嘎嘎嘎啊啊啊aaadd0多对多ss"。
原文地址: https://www.cveoy.top/t/topic/ikyo 著作权归作者所有。请勿转载和采集!