Improve the CHANGELOG entry [ci skip]

上级 27411a7c
## Rails 4.0.0 (unreleased) ## ## Rails 4.0.0 (unreleased) ##
* `composed_of` has removed. You'll have to write your own accessor * `composed_of` was removed. You'll have to write your own accessor
and mutator methods if you'd like to use value objects to represent some and mutator methods if you'd like to use value objects to represent some
portion of your models. portion of your models. So, instead of:
class Person < ActiveRecord::Base
composed_of :address, :mapping => [ %w(address_street street), %w(address_city city) ]
end
you could write something like this:
def address
@address ||= Address.new(address_street, address_city)
end
def address=(address)
self[:address_street] = @address.street
self[:address_city] = @address.city
@address = address
end
*Steve Klabnik* *Steve Klabnik*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册