1
我正在为我的个人网站撰写投资组合部分。每个投资组合项目,其中有许多,看起来大约是这样的:如何以干燥方式在Rails中存储静态但重复的内容
<li>
<h3>Core Product</h3>
<ul>
<li>Snip</li>
<li>2011 to 2012</li>
</ul>
<%= link_to "http://sniphq.com/demo" %>
<p>
Snip is a company I started in January 2011.
I did all the programming, design, usability testing, sales, marketing—everything.
The overall idea is to allow hairstylists to spend more time on hair and less time on everything else.
</p>
</li>
我不喜欢怎么会在这里的数据是如此紧密结合是如何显示的数据。我会很整齐的,如果我可以做这样的事情:
snip:
client_name: Snip
project_name: Core Product
period: 2011 to 2012
link: http://sniphq.com/demo
description: Snip is a company I...
然后在我看来,我可以通过这些项目迭代。我知道我可以创建一个投资组合项目数据库表,但比我需要的是这将是困难,我作为一个内容的作家维护,也比较复杂,作为一个程序员。
什么是实现这种功能的最佳/最简单的方法是什么?
这正是我想要的。谢谢。 – 2012-07-16 16:40:37