可以重复执行这种操作以构造整个列表,参见清单23。
You can repeat this for the entire list as shown in Listing 23.
同样的,像acts_as_list等,我发现很有意思的是,ActiveRecord需要许多重复的构造,违反了DRY原则。
Likewise with acts_as_list, etc. I find it interesting that ActiveRecord requires so many duplicate constructs in violation of the DRY Principle.
创建一个对象定义,您能通过它重复创建新实例,但必须先定义其构造器。
To create an object definition from which you can repeatedly create new instances, you must first define its constructor.
应用推荐