Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个哈希:
hash = "email_address"=>"test@example.com"
我想使用 erubis 从这个哈希值“test@example.com”中获取值。这不起作用:
<% pp hash.[email_address] %>
你试过这个吗?
<%= pp hash["email_address"] %>
或者
<%= pp hash[:email_address] %>