Created
January 7, 2017 08:41
-
-
Save tjad/8f67a4cd01edd2572fc5c88573763c0d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 OtherModel | |
include ActiveNode | |
property :name | |
end | |
class MyModel | |
include ActiveNode | |
has_one :out, :other_model, :SOME_TYPE | |
end | |
my_model = MyModel.new | |
#however, this should not be calling underlying framework to handle the association, I don't want extra queries at this point | |
my_model.other_model = OtherModel.new(name: 'test') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment