摘要: 碰到需要调用操作系统shell命令的时候,Ruby为我们提供了六种完成任务的方法:1.Exec方法:Kernel#exec方法通过调用指定的命令取代当前进程: 例子: $ irb >> exec 'echo "hello $HOSTNAME"' hello nate.local $值得注意的是,ex... 阅读全文
posted @ 2014-09-10 23:18 juandx 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 一篇看到的讲解得不错的文章 http://blog.csdn.net/clskkk2222/article/details/6735365这里还有一些例子:Rake DocumentationRails Rake TutorialUsing the Rake Building Language===... 阅读全文
posted @ 2014-09-10 22:12 juandx 阅读(1431) 评论(0) 推荐(0) 编辑
摘要: 在render中,即使有:action,那么也仅仅是取对应的view中的模板(html.erb)而已,所以这里即使浏览器中的url是/orders/xcreate,但是显示的界面是/app/views/orders/xshow的代码 def xcreate flash.now[:notice... 阅读全文
posted @ 2014-09-10 15:35 juandx 阅读(559) 评论(0) 推荐(0) 编辑