Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2210120
  • 博文数量: 1058
  • 博客积分: 10018
  • 博客等级: 上将
  • 技术积分: 12641
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-23 19:24
文章分类

全部博文(1058)

文章存档

2010年(108)

2009年(736)

2008年(214)

我的朋友

分类: LINUX

2009-07-21 22:07:35

该版本在修正了一些bug之外,还引入以下新特性:

Active Record

1. touch is a convenient method to update a record’s timestamp and nothing else. This is extracted from apps whose models “touch” others when they change, such as a comment updating the parent.replies_changed_at timestamp after save and destroy. Timestamping an entire has_many association makes it easy to build a key for fragment caching that covers changes to the parent object and any of its children. This pattern is wrapped up as belongs_to :parent, :touch => :replies_changed_at. When the child changes, parent.replies_changed_at is touched. :touch => true is defaults to :touch => :updated_at.
2. :primary_key option for belongs_to for broader support of legacy schemas and those using a separate UUID primary key: belongs_to :employee, :primary_key => 'SSN', :foreign_key => 'EMPID'

JSON

1. decoding backends for the json and yajl libraries.
2. leaner user-facing encoding API

其他方面

1. Add :concat option to asset tag helpers to force concatenation.
2. Restore backwards compatibility for AR::Base#to_xml.
3. Move from BlueCloth to Markdown for the markdown helper.

下载地址:

详情请看这里

阅读(354) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~