<%=h...%>

Abder-Rahman Ali wrote:

In the "Head First Rails" book, it mentions that "h" in <%=h...%> is a
helper method.

Can someone describe what that means? And, when should I use <%=h...%>?
Is it when I want the result to be displayed on my view for example?

Thanks.

Hi,

I know the use of <%=h...%> is to show the html tags:

Consider the following example:

@a= "hi how are <br/>you."

<%= @a %>
#=> hi how are
you.

<%=h @a %>
#=> hi how are <br/>you.

Regards,

Saurabh