-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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_attributes without :tag_list key sets tag_list to [] #547
Comments
What version are you using ? I can't replicate this with the 3.2.5! |
3.2.3 |
I added a test for it. Just to be sure that it won't break later. |
Ok, I figured it out. The problem was validation. I had a validation that checked the number of tags in the Now, the problem is, that in between the time In your test that you've added in response to my issue, you can clearly see that problem: you have to |
I added reload just to be sure that i'm testing the database data and not the in memory one. Can you write a test case ? |
Ok, I wrote a test to specifically address the validation issue and it passed: snitko@2d1f238 Which makes me think there is indeed something wrong with my app. If you don't mind, I'll report back if I manage to write a test that fails. And anyway, thank you for making me do it and discovering the problem further. |
Ne za chto. |
Any solution to this yet? I got the same problem in the following context:
problem: model.login.name is updated but model.logins.udf_list is not updated Using version 4.0.0 |
I have a problem while updating the model that is taggable. If I call update_attributes, but without the
:tag_list
- then all tags are removed from this object. Example:So wrong. If I don't touch
:tag_list
, it shouldn't delete all of the existing tags on this model.The text was updated successfully, but these errors were encountered: