acts-as-taggable-on
acts-as-taggable-on copied to clipboard
Bugfix dirty attributes handling for `tag_list=`.
tag_list
was not being correctly marked as dirty if it was modified on a preexisting record.
This was caused by two factors:
- Inconsistent use of singular/vs plural tagging contexts.
-
#custom_contexts
considered all contexts as custom, including those explicitly specified on the model.
Actually, I think this fix may be incorrect, I'm going to close this PR until I can verify.
Never mind, I think it's okay, I just ran into an unrelated bug with concat
when testing this code.
:+1:
@mbleigh up?
see #786 and #257 thanks for the fix
Hey, thanks for the fix @lukeasrodgers ! What's the status of this one? We really need a fix on our application codebase :).
Also, it looks similar to #723 and #812.
Thanks a lot !
@mbleigh up ?
+1
Is this the main pull/issue for *_list_changed?
not working in rails 5? I dropped in a hack into the controller, but I would like to implement dirty inside model callbacks at some point.
I would love to help if I can. Please let me know if you have a grip on all the related issues/pulls that exist!
Merged in master to fix merge conflicts. Failing specs are unrelated to changes here, seem to be due to the fact that bundler 2 requires ruby version >= 2.3.0 (https://bundler.io/blog/2019/01/03/announcing-bundler-2.html)
bundler issue fixed in https://github.com/mbleigh/acts-as-taggable-on/pull/934, though @mbleigh you may prefer different solution (e.g. just drop testing ruby < 2.3)
@RudyOnRails can you share your controller code workaround for this bug? Thanks!
@RudyOnRails can you share your controller code workaround for this bug? Thanks!
Sorry @ivanovv - I can't find it ATM. If I remember where it was, I will post!
What's the status of this? It seems still broken, isn't it?
@taggable.tag_list = ['one', 'two']
@taggable.skill_list = ['react', 'rails']
@taggable.save
only saves one of the two lists
@seuros any clues on this? Thanks!