-
Notifications
You must be signed in to change notification settings - Fork 20
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
to_callback.rb calls mongoid pull
with too many arguments
#16
Comments
Agreed, it does look like it was changed in mongoid. I will try and get to this in the next week or so, but pull requests are welcome too! |
Might give that a go, but there is a bit of meta-foo to get my head around ;) Is there any reason why the |
I imagine a block could be used, I think I went with the Strings because it looked more readable. Feel free to experiment, the test coverage is fairly extensive so we'll know if something breaks :) |
Fixed. |
I am using mongoid and mongoid_alize from git and Rails 4.0.0
I have the relation
in a model called
Distribution
, and I am trying to add to theapks
collection:However it throws a
wrong number of arguments (2 for 1)
argument error. It seems to be because into_callable.rb
thepull_from_inverse
method callspull
from mongoid with too many arguments (from: https://github.com/dzello/mongoid_alize/blob/master/lib/mongoid/alize/to_callback.rb?source=c#L36):Looks like pull may have changed/been refactored in recent mongoid verson: https://github.com/mongoid/mongoid/blob/master/lib/mongoid/persistable/pullable.rb
here is my stack trace starting from where it leaves my class:
The text was updated successfully, but these errors were encountered: