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

Update macro method usage, after receiving undefined error in Mongoid 7.0 #1282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update macro method usage, after receiving undefined error in Mongoid 7.0 #1282

wants to merge 1 commit into from

Conversation

Mar1cX
Copy link

@Mar1cX Mar1cX commented Jul 26, 2019

Issue: Mongoid with 7.0 patch removed file which contained macro method. Formtastic gem relies on this method in various places in code. Currently, projects which use Mongo 7.0 are having undefined 'macro' method error.

Solution: To avoid breaking current macro usage and fix the error for Mongoid 7.0 database based projects, a solution with Proxy Object was introduced in this pull request. Using Proxy Object allowed fixing macro method issue while keeping gem mostly intact. In the future, if other special issues will appear with the reflection object, fixing them will be easier by modifying this class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants