开发者

rails 3: what does the h() in "content_for(:title) { h(page_title.to_s) }" do?

My app is using a view helper than adds a layout helper that contains the code

content_for(:title) { h(page_title.to_s) }

and I'm trying to modify it somewhat but have开发者_如何学C no idea what the h() means?


It is an ERB method to escape the HTML. See the ERB docs for more info about it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜