rails consol reload!

每天一剂Rails良药之The Console Is Your Friend

ROR 2008-03-13 13:27:35 阅读6 评论0  字号: 订阅

我们要多使用ruby script/console,在开发Rails程序时最好启动一个console窗口 
我们来看看我们可以使用console干什么: 
Java代码 复制代码
  1. Person.find_by_first_name("Chad").email   
  2.   
  3. Calendar.column_names   
  4.   
  5. app.get "/"  
  6. app.follow_redirect!  

如果Ruby编译时有readline支持,我们可以使用Tab键来补全类名和方法名 
如果我们修改了Model,我们不需重启console,运行reload!()即可

原文地址:https://www.cnblogs.com/lexus/p/1947343.html