-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
checks added for :update_attribute for dynamic attributes refs #3875 #3882
Conversation
When we call process_attribute, it does all the checks for ensuring that dynamic attributes are allowed. This impacts the :counter_cache option as it requires dynamic fields. When using the counter_cache, the model must include Mongoid::Attributes::Dynamic
changing the behaviour of the counter_cache to make it add a |
@arthurnn Considering that |
@gautamrege thats right +1 , I will double check the documentation for counter_cache and see if we state this in there, before merging this. |
@durran Any feedback on this PR? This bug can still reproduced against master. |
@Shwetakale we still need to figure out how to allow counter_cache to continue to work with this change. Including |
Yes, we should add the attribute on the parent document and not rely on |
@estolfo Ok I will update PR. |
thanks! |
…ongodb#3882 When we call process_attribute, it does all the checks for ensuring that dynamic attributes are allowed. Note This impacts the :counter_cache option as it requires field defined on parent.
@estolfo Closing this PR as created new one with updated code from mongoid master branch. |
When we call process_attribute, it does all the checks for ensuring that
dynamic attributes are allowed.
Note This impacts the
:counter_cache
option as it requires dynamic fields.When using the counter_cache, the model must include
Mongoid::Attributes::Dynamic
refs #3875