每天一剂Rails良药之The Console Is Your Friend
ROR 2008-03-13 13:27:35 阅读6 评论 字号:大中小 订阅
我们要多使用
ruby script/console,在开发Rails程序时最好启动一个console窗口
我们来看看我们可以使用console干什么:
Java代码
- Person.find_by_first_name("Chad").email
-
- Calendar.column_names
-
- app.get "/"
- app.follow_redirect!
如果Ruby编译时有readline支持,我们可以使用Tab键来补全类名和方法名
如果我们修改了Model,我们不需重启console,运行
reload!()即可
转载于:https://www.cnblogs.com/lexus/archive/2011/01/29/1947343.html