-1

I have a hash:

hash = "email_address"=>"test@example.com"

I would like to get the value from this hash which is "test@example.com" using erubis. This doesn't work:

<% 
pp hash.[email_address]
%>
Ross Attrill
  • 2,594
  • 1
  • 22
  • 31
Rene Zammit
  • 101
  • 1
  • 1
  • 3

1 Answers1

1

Did you try this?

<%= pp hash["email_address"] %>

or

<%= pp hash[:email_address] %>
Kulbir Saini
  • 3,926
  • 1
  • 26
  • 34