-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A model called Collection with a has_many relation #99
Comments
What error are you seeing? Can you provide a simple test case? |
Using the gem as it is on github master. class Collection
include MotionModel::Model
include MotionModel::ArrayModelAdapter
columns name: :string
has_many :items, dependent: :destroy
end class Item
include MotionModel::Model
include MotionModel::ArrayModelAdapter
columns name: :string
belongs_to :collection
end c = Collection.create(name:'asdf')
c.items.create(name:'qwer') results in error
|
sxross
added a commit
that referenced
this issue
Jan 3, 2014
Please try github branch |
sxross
added a commit
that referenced
this issue
Jan 3, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MotionModel relations dont seem to like using the name Collection and having a Collection has_many/belongs_to Items. Probably a collision with the internal collection method? Anyway not sure if this is a bug or a need for a reserved words list in the documentation.
The text was updated successfully, but these errors were encountered: