Created
February 3, 2009 20:01
-
-
Save somebee/57714 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String | |
end | |
class Event | |
include DataMapper::Resource | |
belongs_to :actor, :model => "User", :child_key => [:actor_id] | |
end | |
Event.get(1).actor => | |
merb : worker (port 4000) ~ undefined method `get' for nil:NilClass - (NoMethodError) | |
/usr/local/lib/ruby/gems/1.8/gems/dm-core-0.10.0/lib/dm-core/associations/many_to_one.rb:83:in `actor' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment