If you are like me, you avoid creating page titles because it is kind of a pain. But in this episode I will show you a clean way to add titles to your pages.
# application_helper.rb
def title(page_title)
content_for(:title) { page_title }
end
本文介绍了一种简洁的方法来为网页添加标题,通过使用Ruby的helper方法简化了原本繁琐的操作过程。
749

被折叠的 条评论
为什么被折叠?



