---
title: "beast学习笔记——7,forums/index.html.erb——结束篇"
author: "helloqidi"
date: "2010-12-22T16:40:57Z"
tags: []
categories: ["编程语言"]
slug: "beast-7-forums-index-html-erb"
draft: false
lastmod: "2010-12-22T17:19:03Z"
id: 849497
url: "https://helloqidi.iteye.com/blog/849497"
---

**beast学习笔记——7,forums/index.html.erb——结束篇**

 

1

(1)代码

&lt;% content\_for :right do %&gt;

......

&lt;% end %&gt;

（2）表示

已在上一节解释过了。

 

2

（1）代码

 number\_with\_delimiter(current\_site.topics.size)

（2）表示

 number\_with\_delimiter，view的辅助方法，用于格式化数字，例如：

&lt;%=number\_with\_delimiter(12345678)%&gt;

=&gt;12,345,678

 

3

（1）代码

&lt;% if recent\_forum\_activity(forum) %&gt;

（2）表示

recent\_forum\_activity，来自helper方法，在文件forums\_helper.rb中

========分割线==========

当我学习beast到此时，在Ruby On Rails的QQqun有人指点，可以看“Ruby on Rails Tutorial”来学习（[http://railstutorial.org/chapters/beginning#top](http://railstutorial.org/chapters/beginning#top)），起码，它是测试驱动开发的实例。

所以，打算终止Beast源码的学习，开始新的学习旅程。