Skip to content
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

Embedded Relations in Mongoid #498

Merged
merged 2 commits into from
Jul 12, 2015

Conversation

pencilcheck
Copy link
Contributor

Support referenced relations for mongoid in ransack is very difficult due to the fact that mongodb has no joins, therefore I guess might as well start with something that I have a workable solution to.

I have not written any specs for this PR yet, just to throw it out there to see if this is a good idea.

If `skills_name_cont` is passed in where skills is a embeds_many relation and name is the attribute of the Skill, the attr_name will becomes `skills.name` which will be passed in to the resulting predication query.
@jonatack
Copy link
Contributor

Thank you @pencilcheck.

I don't have Mongoid installed right now.

If you add spec coverage, I'm 👍 with trusting your work and merging it in, if it will help people using Ransack with Mongoid.

jonatack added a commit that referenced this pull request Jul 12, 2015
Embedded Relations in Mongoid
@jonatack jonatack merged commit 91354e9 into activerecord-hackery:master Jul 12, 2015
@jonatack
Copy link
Contributor

Mongoid users: specs would be welcome! cc @pencilcheck

@pencilcheck
Copy link
Contributor Author

Sure, I will submit specs when I have more time. Thanks for the reminder.

jonatack added a commit that referenced this pull request Jul 18, 2015
Completes PRs #562, #498, #426, #560 and #537 among others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants