Hi guys
Seeing `composed_of` removed I put together a quick proof-of-concept
ValueObject implementation on top of ActiveModel and ActiveRecord
`serialize`.
https://gist.github.com/3070184
Features:
- VO's are immutable
- VO's are identified by their attributes
- VO's can be conveniently
Many users try to overwrite the to_param method of AR to add more
expressivness and value of Seo to the url using something like the
following:
def to_param
id.to_s + title. parameterize + '-' + author. parameterize
end
That generate url like that:
http://host/books/10-goodbook-guest