The <%= @post.source_account %>
is an email address. I want this to display as a link that says "Email Me" and when click it will open the users mail client
<% if @post.source_account.present? %>
<h4>Email Seller: <small> <%= @post.source_account %><br></h4>
<% end %>
You can use mail_to
, which creates a mailto link tag to the specified email address:
<%= mail_to @post.source_account, "Email Me" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With