留言板的留言、回复、删除功能用ruby如何写,拜托各位大神
ruby吧
全部回复
仅看楼主
level 1
你猜009 楼主
新手,简单的看了高桥征义的ruby基础教程,一个简单的留言板前端已经写好了,用ruby该如何写后端?请大神们给点思路,感觉入门好难.....
附前端代码
<html>
<head>
<meta charset"utf-8">
<title>留言板</title>
<style type="text/css">
body{margin:0;padding:0}
.shang{width:800px;height:200px;margin:10px auto}
.left{width:350px;height:200px; float:left}
.right{width:450px;height:200px; float:left}
.xia{width:800px;height:250px;margin:30 auto}
.next{width:800px;height:50px;margin:1px auto}
.end{width:800px;height:50px;margin:1px auto}
</style>
</head>
<body>
<div class="shang">
<div class="left">
昵称:
<input type="text"name="myname">
<br/>
<br/>
Q Q:
<input type="text"name="qq">
<br/>
<br/>
邮箱: 
<input type="text"name="mail">
<br/>
<br/>
<br/>
<input type="submit" style="background-color:#66DD00;color:white;" value="添加留言">
   
<input type="reset" style="background-color:#FFBB00;color:white;" value="重新输入">
<br/>
</div>
<div class="right">
<form method="post"action="save.php">
<label>内容:</label>
<br/>
<textarea cols="40" rows="10">
请输入内容</textarea>
<br/>
</div>
</div>
<div class="xia">
<hr/>
<p>111.昵称为:你高数写完了吗还在浪 在2015-11-9 21:09:11 的留言
<input type="button" style="background-color:#00DDDD;color:white;"value="回复" >
<input type="button" style="background-color:#FF0000;color:white;" value="删除">
<br/>
双十一快到了好想找个女朋友啊
<br/>
<textarea cols="5" rows="1">呵呵呵</textarea><input type="submit" style="background:blue;color:white";value="回复" >
<br/>
回复:
<br/>
少年不要多想
</p>
<hr/>
<p>112.昵称为:你线代写完了吗还在浪 在2015-11-9 21:09:11 的留言
<input type="button" style="background-color:#00DDDD;color:white;"value="回复" >
<input type="button" style="background-color:#FF0000;color:white;" value="删除">
<br/>
可是找谁的女朋友比较好呢?
</p>
<hr/>
<p>113.昵称为:你工图写完了吗还在浪 在2015-11-9 21:09:11 的留言
<input type="button" style="background-color:#00DDDD;color:white;"value="回复" >
<input type="button" style="background-color:#FF0000;color:white;" value="删除">
<br/>
算了我还是回去打LOL吧
</p>
</div>
<div class="next">
<p>
<input type="button" value="首页" >
<input type="button" value="上一页" >
<input type="button" value="下一页" >
<input type="button" value="尾页" >页次:1/186 共有 233 条留言 转到 <textarea cols="1" rows="1">1</textarea> 页
<input type="button" style="background-color:blue;color:white;"value="Go" >
</p>
</div>
<div class="end">
<p>Copyright @ 2011 All Right Reserved</p>
</div>
</body>
</html>
2016年02月24日 14点02分 1
1