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

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

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

php - Cloud9 cloud IDE and CakePHP -