format as link to email address, ruby on rails -


the <%= @post.source_account %> email address. want display link says "email me" , when click open users mail client

 <% if @post.source_account.present? %>           <h4>email seller: <small> <%= @post.source_account %><br></h4>           <% end %> 

you can use mail_to, creates mailto link tag specified email address:

<%= mail_to @post.source_account, "email me" %> 

Comments

Popular posts from this blog

angularjs - Showing an empty as first option in select tag -

How to wrap some text in a rectangle in QML? -

c# - Inconsistent accessibility errors -