Define association method in Data-Factory
Reported by Darsono Sutedja | August 18th, 2008 @ 11:21 AM | in 0.7.0
Instead of overloading the field method to handle data association, we need to define a new method called association.
usage:
association :owner_id, {User => :id}, :first
this is equivalent to the old way of doing association:
field :owner_id, {"user" => "id"}, {:assoc => :first}
Comments and changes to this ticket
-

Mark Bates August 18th, 2008 @ 11:23 AM
- → State changed from new to resolved
(from [450aaec8f875dc3551709da6458dac602c915828]) New association method in data_factory [#102 state:resolved] http://github.com/markbates/mack...
-

Mark Bates August 18th, 2008 @ 02:25 PM
(from [8a751a1f06eaf31d0cd9d3b1f175ebe91a10800d]) Merge branch 'master' of git@github.com:markbates/mack-more
- 'master' of git@github.com:markbates/mack-more: New association method in data_factory [#102 state:resolved] http://github.com/markbates/mack...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Mack is a Ruby web application framework focused on writing distributed, portal-like, applications. it's built on best of breed technologies, such as Rack, Cachetastic, and DataMapper.
People watching this ticket
Tags
Referenced by
-
#102 Define association method in Data-Factory
(from [450aaec8f875dc3551709da6458dac602c915828]) New ass...
-
#102 Define association method in Data-Factory
'master' of git@github.com:markbates/mack-more:
New assoc...