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
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to