浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年11月25日

摘要: rake -D timerake time:zones:localin application.rb #lexus added at 20101125 config.active_record.default_timezone = :local config.active_record.time_zone_aware_attributes = false config.time_zone = ... 阅读全文
posted @ 2010-11-25 16:15 lexus 阅读(329) 评论(0) 推荐(0)

摘要: Ruby语言在实际应用中可以帮助我们轻松的完成许多功能需求。其内置的大量方法是我们实现功能的前提。下面我们为大家介绍其中Ruby时间方法的相关方法。Ruby代码管理经验分享Ruby创建构造器技巧分享Ruby异常处理结构特点介绍Ruby数学表达式中各种应用解析几种常见Ruby on Rails内置方法介绍Ruby时间方法:puts20.seconds#=>20 puts20.minutes#=... 阅读全文
posted @ 2010-11-25 16:07 lexus 阅读(278) 评论(0) 推荐(0)

摘要: ruby学习笔记(8)-"静态方法的4种写法"与"单例方法的2种写法"01#静态方法的4种写法02classTest03defTest.StaticMethod104puts"Test.StaticMethod1"05end0607defself.StaticMethod208puts"Test.StaticMethod2"09end1011class<< Test12defStati... 阅读全文
posted @ 2010-11-25 14:51 lexus 阅读(440) 评论(0) 推荐(0)

摘要: 当你将komodo新建的工程文件夹放在什么目录下,那么那个目录就是工程的根目录 阅读全文
posted @ 2010-11-25 14:33 lexus 阅读(167) 评论(0) 推荐(0)

摘要: 大家每天都有一个好心情 :)rails cascade 级联删除[ruby]用一次忘记一次,记下来。:dependent - if set to :destroy all the associated objects are destroyed alongside this object by calling their destroy method. If set to :delete_all ... 阅读全文
posted @ 2010-11-25 13:24 lexus 阅读(479) 评论(0) 推荐(0)

摘要: on 是mysql中的关键字,使用做为字段,请`on`type是rails中的关键词,使用kind 来代替做为mysql字段 阅读全文
posted @ 2010-11-25 11:35 lexus 阅读(207) 评论(0) 推荐(0)

摘要: ruby-1.9.2-p0 > Time.now=> 2010-11-25 10:34:20 +0800date2010年 11月 25日 星期四 10:29:48 CST因为使用的是正8区时间所以两个的对比效果如果是utc时间,time.now会显示+0000 阅读全文
posted @ 2010-11-25 10:36 lexus 阅读(188) 评论(0) 推荐(0)

摘要: 用户名: 密码: 登录 注册rails漫步追求,生活中不一而足的美丽,还有快乐; ...主页博客相册|个人档案 |好友查看文章acts_as_tree 插件应用2009-08-06 10:541.安装: 我在github上fork了这个插件,访问地址是:http://github.com/krongk/acts_as_tree/tree/master Give this clone URL t... 阅读全文
posted @ 2010-11-25 10:34 lexus 阅读(312) 评论(0) 推荐(0)